|  Register

Asynchronous Omniture SiteCatalyst

by brett hale in Omniture

THIS IS AN EXPERIMENT ONLY AND NOT INTENDED FOR ANY PRODUCTION SITES.

Udpate:: You can now use Google Tag Manager to serve SiteCatalyst.

With that said, please feel free contribute if you like. This was a learning experience for me so any constructive critisism is welcome. It is far from complete but I seem to have gotten the image call going, including, some props and eVars. I have posted this code on github for easy sharing. You can find it here: Omniture SiteCatalyst Asynchronous Project.

I began by trying to disect the Google Analytics code which led me to Peter Coles' blog. This served as the skeleton of my attempt.

Notes:

The config section is at the bottom of the s_code.js file.

You must add the namespace and tracking server information.

eVars and props are currently set in the on-page code like this

 

 <script type="text/javascript">

  var _sm = _sm || [];
//set RSID and Initialize
 _sm.push(['s_init', 'INSERT_RSID']);
//set the variables
 _sm.push(['setVar',
 	['prop1','prop1'],
 	['prop2','prop2'],
 	['eVar1','evar1'],
 	['eVar2','evar2']
 ]);
//make the call
 _sm.push(['s_fire']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.straightfromhale.com/osc/s_code.js';
    var osc = document.getElementsByTagName('script')[0]; osc.parentNode.insertBefore(ga,osc);
  })();

</script>

 

Comments

Gravatar

2013-04-12

It's a real pity that Adobe doesn't release an asynchronous library themselves.

But it amazes me to see how many really nice solutions are being developed recently.


Just wanted to add another library that handles SiteCatalyst asynchronously:
https://github.com/DieProduktMacher/asyncSC

And here is also a short blog article about it (in german):
http://www.dieproduktmacher.com/asynchrones-sitecatalyst-script/

Cheers,
Tobias



Gravatar

brett hale

2013-03-18

Thanks, I'll take a look at it.

Gravatar

Mhlassoued

2013-03-18

Here is a nice library that contains an asynchronous Ominuture calls:
https://github.com/mhlassoued/OmniPlus.git

Cheers,

Post a comment


StraightFromHale.com
  • Top ↑
  • ©2017 StraightFromHale.com. All Rights Reserved.