Highlighted

How do I apply a Load Rule on an event action for pixel tracking? I want Pixel 1 to fire when Visitors click internal 'Buy Now' button, Pixel 2 when Visitors click external 'Buy Now' button, and Pixel 3 when Visitors click to Watch Video.

 
5 REPLIES 5
Highlighted

How do I apply a Load Rule on an event action for pixel tracking? I want Pixel 1 to fire when Visitors click internal 'Buy Now' button, Pixel 2 when Visitors click external 'Buy Now' button, and Pixel 3 when Visitors click to Watch Video.

Employee Emeritus

Hi Bryce,

Load rules cannot be processed on utag.link() (i.e. the method we use to flag something as an 'action' instead of a a 'view' (which uses utag.view()).

utag.view() CAN be used to load in a new tag but you don't want to use this in this scenario (as all of your tags will fire an additional request which is interpreted as a 'view'.

If I were in this situation I would do the following:

1. Ensure the tags are available on the page(s) with the actions you want to track on via a load rule. This will make sure the tag is ready to fire when you need it to.

2. Set up your tag to pass in the correct values upon utag.link() (i.e. when the action happens). For example, if you call utag.link({event_action:'buy now'}) then make sure you map 'event_action' to the tag of your choice so the tag knows what value to pass in from the data layer.

3. Set up an javascript extension to stop the tag from firing when you don't want it to : this is a workaround to stop the tag firing when the page loads as you only want to fire it on one of your actions (e.g. clicks on 'buy now' button). Use this code:

http://jsfiddle.net/rajtastic/n563mqyh/

Note: this extension MUST be scoped to the tag you want to fire (http://note.io/ZtTd5k) or it may cause Tealium to stop loading at all.

4. Ensure the tag you are using supports 'link' tracking : some tags only support 'view' tracking. You can edit the template by following this tutorial (How do I update a tag template?) but the code you're looking for is here:

Tag supports views and links (http://note.io/ZtSUrq)
Tag only supports views (http://note.io/1uF7YP4)

You'll need to update your template to ensure it supports 'links' too in this use-case (bear in mind if you do this the tag will no be able to fire on all 'link' events if you have any tracked - you may or may not want this.

That's it!

So, to recap - here's what you have done:

1. Ensure the tag is available on the page with the action you want to fire the tag on
2. Ensure the tag is killed unless it meets your specific criteria (i.e. someone clicks on one of your buttons)
3. Ensure your tag supports firing on an action (i.e. on 'link')

Let me know if you have any questions!

Thanks,

Roshan

Highlighted

How do I apply a Load Rule on an event action for pixel tracking? I want Pixel 1 to fire when Visitors click internal 'Buy Now' button, Pixel 2 when Visitors click external 'Buy Now' button, and Pixel 3 when Visitors click to Watch Video.

Rookie Contributor
Hey! What if your tag doesn't support link? Is there a way to hack it to support it?
Highlighted

How do I apply a Load Rule on an event action for pixel tracking? I want Pixel 1 to fire when Visitors click internal 'Buy Now' button, Pixel 2 when Visitors click external 'Buy Now' button, and Pixel 3 when Visitors click to Watch Video.

Employee Emeritus
Highlighted

How do I apply a Load Rule on an event action for pixel tracking? I want Pixel 1 to fire when Visitors click internal 'Buy Now' button, Pixel 2 when Visitors click external 'Buy Now' button, and Pixel 3 when Visitors click to Watch Video.

Rookie Contributor
Great! I'm glad it's as simple as that
Highlighted

How do I apply a Load Rule on an event action for pixel tracking? I want Pixel 1 to fire when Visitors click internal 'Buy Now' button, Pixel 2 when Visitors click external 'Buy Now' button, and Pixel 3 when Visitors click to Watch Video.

Bronze Contributor
Bronze Contributor

Hi Roshan, 

I was not able to scope the extension to specific tag. It's greyed out and set to after load rules. How can we set it to specific tag?

Thanks,
Saeshwar.