Question

Google recently released a new feature "Tag Manager"

Do you know any success stories and give successful site html-examples?

I was not able to make Events working. Here is my site, but it fails. You can see which code is inside by Ctrl+U in FF. http://landkey.org When I click on test button which supposed to send this event: .....

input type="button" onclick="dataLayer.push({'bubbles_event' : 'ANCHOR_.....  '});  alert('clicking'); " value="bubbles" 

..... nothing is sent in "Net" pane. In dashboard of "Tag Manager"/Container/Tags, I set up a tag, TrackType as "Event" setup event rule, and double checked this few times.

Was it helpful?

Solution

I'm wondering if you're running into an issue where there's a collision on the 'event' namespace. We've autocreated the 'event' rule / macro type to map directly to dataLayer.push({ 'event' : event_name }). This only works if you use 'event' as the key.

In your code example, it looks like you've chosen a different name for your event, called 'bubble_event'. The simplest suggestion I have for you is to just rename 'bubble_event' to 'event' in your data layer. That should hopefully work.

If you're attached to 'bubble_event', then you could create a macro of type Data Layer variable, where the data layer variable name is 'bubble_event'. Then you could create a rule where Bubble Event = whatever value you're looking for. However, it's best practice and recommended to just use the 'event' syntax wherever possible, since then you can consolidate all your events.

Give that a shot and let me know if you're still running into issues.

Cheers, Laura

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top