Highlighted

Is it possible to serialise the SiteCatalyst event through SiteCatalyst tag settings?

Rookie Contributor
I want to define a SiteCatalyst event every time a certain data source is defined. Also I would like to serialise that event using the value of that data source. Can I do in tag settings without writing any JS?
4 REPLIES 4
Highlighted

Is it possible to serialise the SiteCatalyst event through SiteCatalyst tag settings?

Employee Emeritus

Tomas,

 

This can't be done via tag setting, but it can be done with a simple extension. Currently there is a basic JS function that needs to be called as documented in the SiteCatalyst Bloomfire post under "Setting s.events in Extensions" for reference. Lets say the variable on the page that you want to set the event equal to is "user_id," and the event number you want to set is 1. Also, user_id equals "123456789" Follow these steps to create this extension:

 

  1. Make sure you have a variable called "sc_events" defined in your Data Sources Tab of the UI. If you do not have sc_events then add the data source and leave the default type of Data Object.
  2. Add a Set Data Values extension
  3. Select "sc_events" from the Set: dropdown
  4. Select JS Code from the To: dropdown
  5. Type this into the box: u.addEvent("event1="+b.user_id);
  6. Add the condition if user_id is populated. This will add "event1=123456789" to the s.events string when user_id is populated.

 

Hope this helps.

Highlighted

Is it possible to serialise the SiteCatalyst event through SiteCatalyst tag settings?

Rookie Contributor
Thanks Jared. How do I connect sc_events to s.events? Do I need to somehow map it in SC tag settings? Also I should probably do: u.addEvent("event1:"+b.user_id) because I need : not = Is that right?
Highlighted

Is it possible to serialise the SiteCatalyst event through SiteCatalyst tag settings?

Employee Emeritus
Hey Tomas, No need to map anything at this point. The u.addEvent function is built into the SiteCatalyst tag template and will add the event to the s.events string automatically. Yes, for serialization you should use a colon ":" instead of an equals "=". Good catch. The equals sign is for adding numeric events. Sorry for the confusion. Slight brain delay :)
Highlighted

Is it possible to serialise the SiteCatalyst event through SiteCatalyst tag settings?

Rookie Contributor
Thanks for the help.