Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

'm finding that implementing our code in the Adobe Analytics console takes a very long time

Avatar

Level 2

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. -->
1 Accepted Solution

Avatar

Correct answer by
Level 8

In addition to what Rahul has mentioned I'm not sure how you've setup or Analytics with DTM. To begin with I'd recommend you start in the following sequence:

 

1) Ensure your Analytics account is setup correctly. Refer to Add Adobe Analytics Tool

2) Then start with Global Variables . This page tells you how to add global variables for your Analytics implementation.

 

Also the S Code version you're using (H14) is very old.

 

Let us know in case of any further queries.

 

Thanks

Nikhil

View solution in original post

2 Replies

Avatar

Correct answer by
Level 8

In addition to what Rahul has mentioned I'm not sure how you've setup or Analytics with DTM. To begin with I'd recommend you start in the following sequence:

 

1) Ensure your Analytics account is setup correctly. Refer to Add Adobe Analytics Tool

2) Then start with Global Variables . This page tells you how to add global variables for your Analytics implementation.

 

Also the S Code version you're using (H14) is very old.

 

Let us know in case of any further queries.

 

Thanks

Nikhil

Avatar

Level 8

Hi,

My apologies for the delayed response.

You can use DTM rules for implementing these tags. 

Here's some documentation for the same.

If you wish to understand DTM from scratch, I'd recommend browsing up to the 'Getting started' portion on the linked document.

Kind Regards

Rahul