Skip to main content
Level 2
Oct 24, 2017 4:34 PM UTC
Solved

Custome DTM Condition

Hi,

Previously my site was getting tracked through Legacy code and now all legacy code has been placed in s code through DTM. Now i want to create a condition on pagename (For Example if pagename is equal to abc)  to get fired some script. I have tried both option Data element and variable set, both are not working.

Please help me in writing custom code.

Thanks

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Kaushalendra
KaushalendraAccepted solution
Adobe Employee
Oct 24, 2017 7:35 PM UTC

Hi lokendras11872334​,

You can create a Page Load Rule under which you can add Third Party Tags for your script and condition for the rule should be based on the way pageName is being populated.

If there is a Data Element which is populating the pageName, check for the Data Elements value in condition. If this doesn't work (rule doesn't fire), it means that the data element is not populated by the time rule condition is checked and hence you need to trigger rule lower in load order.

If pageName is being populated through custom script or an object on page, you can use the same object in rule condition as custom script.

2 replies

Kaushalendra
Adobe Employee
KaushalendraAdobe EmployeeAccepted solution
Adobe Employee
Oct 24, 2017 7:35 PM UTC

Hi lokendras11872334​,

You can create a Page Load Rule under which you can add Third Party Tags for your script and condition for the rule should be based on the way pageName is being populated.

If there is a Data Element which is populating the pageName, check for the Data Elements value in condition. If this doesn't work (rule doesn't fire), it means that the data element is not populated by the time rule condition is checked and hence you need to trigger rule lower in load order.

If pageName is being populated through custom script or an object on page, you can use the same object in rule condition as custom script.

Translate
jantzen_b
Adobe Employee
Adobe Employee
Nov 17, 2017 9:10 PM UTC

lokendras11872334,

Does the previous reply answer your question? If so, would you mind marking it as the correct answer?

Cheers,
Jantzen

Translate