Guest User

Untitled

a guest
Jun 23rd, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.94 KB | None | 0 0
  1. LIVENATION.omniture = new Class({
  2. accepted_properties: ['pageName','channel','pageType','prop1','prop2','prop3',
  3. 'prop4','prop5','prop6','prop7','prop8','prop9','prop10','prop11','prop12','prop13',
  4. 'prop14','prop15','prop16','prop17','prop18','prop19','prop20','prop21','prop22',
  5. 'prop23','prop24','prop25','prop26','prop27','prop28','prop29','prop30','campaign',
  6. 'state','zip','events','products','purchasID','eVar1','eVar2','eVar3','eVar4',
  7. 'eVar5','eVar6','eVar7','eVar8','eVar9','eVar10','eVar11','eVar12','eVar13','eVar14',
  8. 'eVar15','eVar16','eVar17','eVar18','eVar19','eVar20','eVar21','eVar22','eVar23','eVar24',
  9. 'eVar25','eVar26','eVar27','eVar28','eVar29','eVar30','eVar31','eVar32','eVar33','eVar34',
  10. 'eVar35','linkTrackVars','linkTrackEvents'],
  11. initialize: function(){
  12. self = this;/*
  13. this commented code can be uncommented to provide for a JavaScript-only implementation of Omniture
  14. self.accepted_properties.each(function(value, index){
  15. if($type(LIVENATION.registry.omniture[value]) == 'string'){
  16. s[value] = LIVENATION.registry.omniture[value];
  17. } else {
  18. s[value] = ''; // set to blank if not specified
  19. }
  20. });
  21. self.send();*/
  22. },
  23. send: function(property_hash, /*optional*/ anchor, /*optional*/ link_name){
  24. var self = this;
  25. if ($defined(anchor) && $defined(anchor.get) && anchor.get('tag') == 'a'){
  26. s.linkTrackVars = '';
  27. s.linkTrackEvents='None';
  28. $each(property_hash, function(value, key){
  29. if(self.accepted_properties.contains(key)){
  30. s[key] = value;
  31. s.linkTrackVars += key + ',';
  32. }
  33. });
  34. s.tl(anchor,'o', link_name);
  35. } else {
  36. s.t();
  37. }
  38. }
  39. });
Add Comment
Please, Sign In to add comment