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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

DTM: How do I populate a tag with a simple js alert test?

Avatar

Level 3

How do I populate a tag with a simple js alert test in DTM?

1 Accepted Solution

Avatar

Correct answer by
Level 3

Populating a tag with a js alert in DTM is very simple. You just need to place the js alert into a third party tag in the 'Javascript / Third Party Tags' section of a rule. If you just want to test the tag, it's likely best to set this up in a page load rule so no on-page action is needed to trigger the rule fire.

Here's a few links that may provide some additional context if needed: 

View solution in original post

0 Replies

Avatar

Correct answer by
Level 3

Populating a tag with a js alert in DTM is very simple. You just need to place the js alert into a third party tag in the 'Javascript / Third Party Tags' section of a rule. If you just want to test the tag, it's likely best to set this up in a page load rule so no on-page action is needed to trigger the rule fire.

Here's a few links that may provide some additional context if needed: 

Avatar

Level 2

Using console.log() for testing can be a more efficient method, since you don't have to worry about any the code being interrupted while the browser waits on the alert popup.

Avatar

Employee

In case the console is not open, you can use the built-in DTM function _satellite.notify('message',1) as well. It provides the additional capability of handling multiple error levels.