Question: how to read webpage tags and use them in triggers (non-marketo webpages) | Community
Skip to main content
Level 2
November 17, 2022
Solved

Question: how to read webpage tags and use them in triggers (non-marketo webpages)

  • November 17, 2022
  • 1 reply
  • 2680 views

We have solution tags in the backend of our webpages - every page is tagged with a solution area. Now we want to use these tags for our interest scoring/solution scoring.

 

Example: I visit the webpage example.com/how-to-forecast with a tag in the backend: analytics.

 

I want marketo to read the tag: analytics and give +5 points on interest score: analytics.

 

Our webdevelopers don’t want to add these tags in the url as part of the slug - reason: keep them clean and user-friendly.

 

What are the best practices to achieve this? How do we push the tags to marketo when someone is visiting the page? (must be usable in trigger). Any tips much appreciated. 

Best answer by SanfordWhiteman

We think using a custom endpoint for this would be the best. It takes us no time to set it up and it keeps the HTML pages lean and clean. However, we wonder what's the best practice in this case.

That sounds like the worst choice by far! It also doesn’t really keep the page “lean” because you need JS to fetch the data. And you need to maintain a whole other service to get data the page already knows about itself. Really the last thing I would do.

 

The most appropriate place would be a <meta> tag. I’ve used <meta name="collection"> for this.

1 reply

SanfordWhiteman
Level 10
November 17, 2022

Yes, you can send a custom Munchkin Visit Web Page hit using the JS API. But can’t give further guidance until you give an actual example of how the tags are embedded in the page.

Level 2
November 18, 2022

Thanks for your quick reply Sanford, and already thanks in advance for helping out - I assumed if anyone would answer this, it's probably you. 🙂 

 
Using JS API for this sounds great. We have total control over how these tags should be embedded in the page. We can use:
  • a REST API call from a script to a custom endpoint on our server to get these tags
  • body data attributes, example: <body data-solutions="analytics, planning" ...
  • inlined in the HTML  js variables, example: let mySolutions = "analytics, planning"
  • inlined in the HTML window variables, example: window.mySolutions  = "analytics, planning"
  • etc.
We think using a custom endpoint for this would be the best. It takes us no time to set it up and it keeps the HTML pages lean and clean. However, we wonder what's the best practice in this case.
SanfordWhiteman
SanfordWhitemanAccepted solution
Level 10
November 18, 2022

We think using a custom endpoint for this would be the best. It takes us no time to set it up and it keeps the HTML pages lean and clean. However, we wonder what's the best practice in this case.

That sounds like the worst choice by far! It also doesn’t really keep the page “lean” because you need JS to fetch the data. And you need to maintain a whole other service to get data the page already knows about itself. Really the last thing I would do.

 

The most appropriate place would be a <meta> tag. I’ve used <meta name="collection"> for this.