How to efficiently set page attribute information on the datalayer | Community
Skip to main content
Level 2
February 12, 2023
Solved

How to efficiently set page attribute information on the datalayer

  • February 12, 2023
  • 1 reply
  • 889 views

I would like to add attribute information to each page of our website.
Adobe Analytics has a classification function, but considering the linkage to CDP and other tools , we would prefer to place the information in the datalayer.

 

Example
URL: https://XXXX Attribute: for accountants, blog page,...
URL: https://YYYY Attributes: for marketing, Product Page,...


However, we manage thousands of pages, and it is difficult to specify rules by URL in a batch.
How can we efficiently assign attribute information in such cases?
Currently, I am considering either of the following two options, but neither is efficient.

 

-Directly assign attribute information to each page as tags and store them directly from HTML to the datalayer.
-Mapping URLs and attribute information in a spreadsheet using URLs as keys, and outputting the mapping information in json format and storing it in the datalayer via a tag manager.

 

Thanks in advance.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by yuhuisg

Usually, pushing the attribute into the data layer is the effective way to do it. Your Content Management System (CMS) should allow authors or other authorised roles to set the category for each piece of content. With that, your developers should then be able to read the content category from the CMS and expose that in the data layer for you.

I would say that it's unreliable and ineffective to set the content category in any other way, e.g by the URL, because you'd have to maintain the URL-to-category mapping and have to constantly keep updated on new URLs/pages. And really, content categorisation should be the work of the content owners, not the marketing analyst.

1 reply

yuhuisg
Community Advisor
Community Advisor
February 13, 2023

I assume that you and your content manager have categorised your content already. If you don't have this categorisation yet, then that should be your first step.

With this categorisation, you could then work with your developers to set this in your data layer. You can then pick this up from your tag manager and track it to AA.

satoshi1Author
Level 2
February 16, 2023

Thank you very much.


We have the content categorized, but we have a huge number of pages and would like to be flexible if the categorization rules change.
It is difficult to push tags to DataLayer one page at a time, so I would like to know if there is an effective way to do this.

yuhuisg
Community Advisor
yuhuisgCommunity AdvisorAccepted solution
Community Advisor
February 16, 2023

Usually, pushing the attribute into the data layer is the effective way to do it. Your Content Management System (CMS) should allow authors or other authorised roles to set the category for each piece of content. With that, your developers should then be able to read the content category from the CMS and expose that in the data layer for you.

I would say that it's unreliable and ineffective to set the content category in any other way, e.g by the URL, because you'd have to maintain the URL-to-category mapping and have to constantly keep updated on new URLs/pages. And really, content categorisation should be the work of the content owners, not the marketing analyst.