Highlighted

Fire tag only once per visitor?

Silver Contributor
Silver Contributor

I have implemented a Facebook Tag that I want to trigger when a user watches three video views, and only fire the first time this happens. I have the '3 video view' restriction in, but how do I make sure that it only triggers once per each visitor?

4 REPLIES 4
Highlighted

Fire tag only once per visitor?

Employee Emeritus

You could set a cookie value when the 3 video view condition has been met and add an evaluation to the load rule for the cookie value to not be set.  

Highlighted

Fire tag only once per visitor?

Silver Contributor
Silver Contributor

@steve_thurner, thank you I'll give that a shot!

Highlighted

Fire tag only once per visitor?

Silver Contributor
Silver Contributor

@steve_thurner, my "hook" for the 3 video view condition lives in a custom javascript extension so there isn't an explicit UDO variable that is set for 3 video views. 

 

Ideally, I'd like to set this cookie once my tag triggers, but I don't see a clear way to do that. 

 

What's my best course of action?

Highlighted

Fire tag only once per visitor?

Employee Emeritus

 

@andrea_kebalo in you hook code that fires the tag add code to drop the cookie:

document.cookie="videoviews=thirdvideo; expires=Thu, 18 Dec 2013 12:00:00 UTC; path=/";

 

Then set up videoviews as a cookie parameter in the data layer:

 

Screen Shot 2015-10-23 at 11.34.59 AM.png

 

Finally add a load rule like:

 

Screen Shot 2015-10-23 at 11.45.08 AM.png

 

 

This isn't the only solution, but it should work.

 

Thanks,

steve