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

Is setting the Data Layer via Adobe Launch rules a bad practice?

Avatar

Avatar
Level 1
peter-g
Level 1

Likes

0 likes

Total Posts

13 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
peter-g
Level 1

Likes

0 likes

Total Posts

13 posts

Correct Reply

0 solutions
View profile
peter-g
Level 1

16-04-2021

Currently I'm able to create Analytics rules which trigger based on URL, and then push the appropriate data onto the Adobe data layer. I was going to have these rules fire as 1st priority, and then I could use that Data layer information for analytics tracking using subsequent rules.

 

Is this bad practice? I've been unable to create working data elements for the data that gets pushed this way, but I'm still unsure if thats just user error, or because of something inherently wrong with the way I'm setting the data layer. The data is visible in the browser console, I just can't seem to get any Launch rules to meet a value comparison for data added this way.

 

I am trying to avoid having the AEM Sites developers put the Data layer into the source code directly. Any help is greatly appreciated.

 

Thank you!

Accepted Solutions (0)

Answers (1)

Answers (1)

Avatar

Avatar
Springboard
MVP
yuhuisg
MVP

Likes

145 likes

Total Posts

475 posts

Correct Reply

90 solutions
Top badges earned
Springboard
Bedrock
Validate 1
Establish
Contributor
View profile

Avatar
Springboard
MVP
yuhuisg
MVP

Likes

145 likes

Total Posts

475 posts

Correct Reply

90 solutions
Top badges earned
Springboard
Bedrock
Validate 1
Establish
Contributor
View profile
yuhuisg
MVP

19-04-2021

I won't call it "bad" practice, but it is frowned upon, because it hinders discoverability.

There is a general understanding that the data layer is set from web page code (or scripts in the web page). Then the tag management system, e.g. Launch, simply acts as the consumer of the data layer.

If you do set the data layer within Launch, I suggest that you mark this clearly, e.g. in the Rule's notes or in the Action's name. This is so that future maintainers know what is happening there.

Also, to help with you with your troubleshooting effort, use the Adobe Experience Cloud Debugger extension for your browser. In its "Events" panel, you can see how the data layer gets set over time. It could be that the data layer value that you're comparing is unavailable at the moment when your Rule runs.