Which property is the right one to pass tracking events when using omniture custom link tracking?
Actually i'm having this three properties:
s.linkTrackVars = 'events,prop55';
s.events = ['event12','some other event'];
s.linkTrackEvents = 'event12';
but i'm not shure if that this is correct way. Should the s.events
also be passed to the s.linkTrackEvents
like:
s.linkTrackEvents = s.events;
I'm implementing omniture for a customer so i haven't access to the omniture analytics tool.
Any suggestions
linkTrackVars
should be a string value and expects a comma delimited list (no spaces) of each variable you want to track, no object namespace prefix. This includes events
variable if you are tracking events.
linkTrackEvents
should be a string value and expects a comma delimited list (no spaces) of each event you want to track. This should only be the base event itself, not serialization or custom numeric values that you may pop in events
. For example, if you have s.events='event1:12345,event2=23';
you should only have s.linkTrackEvents='event1,event2';
events
should be a string value and expects a comma delimited list (no spaces) of each event you want to track.
Note: I noticed you have events
as an array. Fairly often I see clients do this (and also with linkTrackVars
and linkTrackEvents
), and then later on within the code (usually within s_doPlugins
) have code that converts it to string (e.g. s.events=s.events.join();
). It makes it easier to .push()
values to it based on whatever logic you have, and this is fine, but to be clear, the official syntax is a comma delimited string, not array, so if you do it as an array, you need to ensure it is converted to a comma delimited string before the s.t
or s.tl
call. As an alternative, there is an s.apl
plugin that handles appending values to the string, even ensuring it is unique in the string.
Examples:
Track event1,event2,prop55
s.prop55='some value';
s.events = 'event1,event2';
s.linkTrackEvents = 'event1,event2';
s.linkTrackVars = 'events,prop55';
Track event1 (serialized), event2, prop55
s.prop55='some value';
s.events = 'event1:12345,event2';
s.linkTrackEvents = 'event1,event2';
s.linkTrackVars = 'events,prop55';
Track event1 (custom increment), event2, prop55
s.prop55='some value';
s.events = 'event1=5,event2';
s.linkTrackEvents = 'event1,event2';
s.linkTrackVars = 'events,prop55';