Adobe Analytics in DTM

Avatar

Avatar

davidb98884514

Avatar

davidb98884514

davidb98884514

15-10-2015

Hello,

I'm finding that implementing our code in the Adobe Analytics console takes a very long time, because we have many pages and variables for each page. I tried to copy our current page code in the editor, but it won't let me because of unexpected tokens.

Here's an example of the type of page tag we are trying to place in DTM:

Please let me know if there is an easier way to implement the tags in DTM. My site is UniversalOrlando.com. Thank you!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
<!-- SiteCatalyst code version: H.14.
  
 Copyright 1997-2007 Omniture, Inc. More info available at
  
 http://www.omniture.com -->
  
 <script language="JavaScript" id="omniture_code">
  
 /* You may give each page an identifying name, server, and channel on the next lines. */
  
  
 /* s.server and s.pageType set in s_code */
  
  
 /* oldPageName changed below */
  
 var oldPageName="Home Page"; // Page Name
  
 s.channel="Website A"; // Site or Microsite
  
 s.prop1=""; // User Group
  
 s.prop2=""; // Content Group
  
 s.prop3=""; // Content Focus
  
 s.prop4=""; // Content Sub 1
  
 s.prop5=""; // Content Sub 2
  
 s.prop6=""; // Content Sub 3
  
 s.prop7=""; // Content Sub 4
  
 s.prop10=s.channel;
  
 s.prop11=""; // Property
  
 s.prop13="Attract Visitors"; // Business Objective
  
 s.prop14="Landing Page"; // Business Tools
  
 s.prop15=""; // Attraction
  
 s.prop16="General"; // Origin Segment
  
 s.prop20=""; // VISTA Report Suite
  
 s.prop21=""; // Product Type
  
 s.prop22=""; // Specific Product
  
 s.eVar1=s.prop1; // User Group
  
 s.eVar2=""; // Registration
  
 s.eVar3=s.prop16; // Origin Segment
  
 s.eVar8=s.channel; // Site
  
 s.eVar11=s.prop21; // Product Type
  
 s.eVar12=s.prop22; // Product Name
  
 s.eVar17=s.prop11; // Property
  
 s.events="";
  
  
 /* Setting up hierarchies */
  
 s.hier1 = s.prop8 + " | " + s.prop9;
  
 if(s.prop2 != '') { s.hier1 = s.hier1 + " | " + s.prop2; }
  
 if(s.prop3 != '') { s.hier1 = s.hier1 + " | " + s.prop3; }
  
 if(s.prop4 != '') { s.hier1 = s.hier1 + " | " + s.prop4; }
  
 if(s.prop5 != '') { s.hier1 = s.hier1 + " | " + s.prop5; }
  
 if(s.prop6 != '') { s.hier1 = s.hier1 + " | " + s.prop6; }
  
 if(s.prop7 != '') { s.hier1 = s.hier1 + " | " + s.prop7; }
  
  
 /* Setting hier2 */
  
 s.hier2 = s.channel;
  
 if(s.prop2 != '') { s.hier2 = s.hier2 + " | " + s.prop2; }
  
 if(s.prop3 != '') { s.hier2 = s.hier2 + " | " + s.prop3; }
  
 if(s.prop4 != '') { s.hier2 = s.hier2 + " | " + s.prop4; }
  
 if(s.prop5 != '') { s.hier2 = s.hier2 + " | " + s.prop5; }
  
 if(s.prop6 != '') { s.hier2 = s.hier2 + " | " + s.prop6; }
  
 if(s.prop7 != '') { s.hier2 = s.hier2 + " | " + s.prop7; }
  
  
 /* Setting pageName to hier2 + oldPageName */
  
 if (s.hier2 != '') { s.pageName = s.hier2 + " | " + oldPageName; }
  
 else { s.pageName = oldPageName; }
  
  
 if (s.prop2 != '') { s.hier3 = s.prop2; }
  
 if (s.prop3 != '') { s.hier3 = s.hier3 + " | " + s.prop3; }
  
 if (s.prop4 != '') { s.hier3 = s.hier3 + " | " + s.prop4; }
  
 if (s.prop5 != '') { s.hier3 = s.hier3 + " | " + s.prop5; }
  
 if (s.prop6 != '') { s.hier3 = s.hier3 + " | " + s.prop6; }
  
 if (s.prop7 != '') { s.hier3 = s.hier3 + " | " + s.prop7; }
  
  
 if (s.prop11 != '') { s.hier4 = s.prop11; }
  
 if (s.prop14 != '') { s.hier4 = s.hier4 + " | " + s.prop14; }
  
  
 if (s.prop13 != '') { s.hier5 = s.prop13; }
  
 if (s.prop14 != '') { s.hier5 = s.hier5 + " | " + s.prop14; }
  
  
 /************* DO NOT ALTER ANYTHING BELOW THIS LINE ! **************/
  
 s.t();//-->
  
 </script>
  
  
 <!-- End SiteCatalyst code version: H.14. -->

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

shawncreed1

Avatar

shawncreed1

shawncreed1

15-10-2015

David,

Did you have the script set to Javascript instead of HTML?  If so, that might be why: the code you pasted above includes HTML elements so it would cause the Javascript parser to throw up an error.

That said, simply pasting your old code into DTM may work, but it's not the best way to make use of DTM's capabilities.  Ideally you would be identifying groups of pages or scenarios where a set of variables (like the ones above) would be set, create a rule for that page group/scenario, and then use the native integration for Adobe Analytics and the supplied fields in the UI to set those variables, like this:

[img]analytics_ui.jpg[/img]

Hope this helps!

-Shawn

Answers (0)