Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Get metatag with data element

renow
Level 1
Level 1

Hi

 

I think this post is related to Analytics & Launch

 

Let's say the following HTML code : <meta name='mymeta' content='myvalue' />

 

We try to have a report/workspace in Analytics with only pages where mymeta is not empty.

 

For the workspace it's ok but how can I store/log somewhere that a page has this meta ?

 

Data element + rules ?? If yes how ? where can I find examples ?

 

Thank you in advance.

 

1 Accepted Solution
evolytics_brian
Correct answer by
Community Advisor
Community Advisor

Hi, @renow 

In Launch, I'd recommend creating a data element that scrapes the meta tag from the page, then reference the data element in the necessary rules. For example, with the meta tag from your question (<meta name='mymeta' content='myvalue' />), create the following data element:

  • Name: mymeta
  • Extension: Core
  • Data Element Type: DOM Attribute
  • CSS Selector (right panel): meta[name='mymeta']
  • Use value of: Other Attribute: content

In your rules, you can reference the data element (%mymeta%) to populate props/eVars, send to GA, or any other endpoint you need.

View solution in original post

2 Replies
evolytics_brian
Correct answer by
Community Advisor
Community Advisor

Hi, @renow 

In Launch, I'd recommend creating a data element that scrapes the meta tag from the page, then reference the data element in the necessary rules. For example, with the meta tag from your question (<meta name='mymeta' content='myvalue' />), create the following data element:

  • Name: mymeta
  • Extension: Core
  • Data Element Type: DOM Attribute
  • CSS Selector (right panel): meta[name='mymeta']
  • Use value of: Other Attribute: content

In your rules, you can reference the data element (%mymeta%) to populate props/eVars, send to GA, or any other endpoint you need.

View solution in original post

jantzen_belliston-Adobe
Community Manager
Community Manager
Do any of the answers below answer your initial question? If so, can you select one of them as the correct answer? If none of the answers already provided answer your question, can you provide additional information to better help the community solve your question?