How to Automate Web Analytics testing?
Asked Answered
B

2

7

Omniture/SiteCatalyst's code is integrated onto the webpage to collect the analytics in our firm.

Current process: SiteCatalyst id deployed by pasting HTML code onto each page of the website. This HTML code contains variables and other identifiers that facilitate the data collection process. These variables may be dynamically populated with server or application variables. The code snippet also calls the JavaScript library file, which contains SiteCatalyst-specific JavaScript functions used during metrics collection.

We use Add-on's like Charlie, HTTP Post, DigitalPulse Debugger to Test if the code inserted has accurate values corresponding to it. This process is time consuming and tedious.

How to Automate this process? Any help would be appreciated!

Example 1:

 <a href="javascript:void(s.t());">Click here to send a page view</a>
 s.pageName="New Page"
 s.prop1="some value"
 void(s.t());

Example 2:

 s=s_gi('myreportsuiteid');
 s.linkTrackVars="prop1,eVar1,events"; s.linkTrackEvents="event1";
 s.prop1="some value"; s.eVar1="another value"; s.events="event1";
 s.tl(this,'o','My Link Name');
Bihari answered 30/7, 2013 at 21:55 Comment(0)
O
4

There are a few different ways to automate testing. I've been looking into it lately myself. So far I'm looking into Selenium, Zombiejs and Phantomjs. You can search for "headless testing" which basically let's run code as a browser and test conditions on the page you visit.

Here's a good place to start https://github.com/ariya/phantomjs/wiki/Headless-Testing

Using these platforms, you could easily set pages to automatically validate if the SiteCatalyst code is firing, page names are correct, click events happen etc.

Selenium is an enterprise product whereas the JS frameworks would be more of a development effort.

Obelisk answered 14/8, 2013 at 18:51 Comment(2)
If I'm not mistaken, for Selenium and like tools, to check that they actually fired off and sent the HTTP request to Omniture, you'd need to capture the network traffic using a proxy or Firefox extension for saving HAR network capture files to then parse and validate requests were sent outbound. Otherwise, the other way to do it with just Selenium may be to execute javascript to return the Omniture values (e.g. s.prop1) and see if they match the expected value after the event fires.Pernickety
@michaelp We use a Selenium grid with cucumber. Everything is wired up to run automatically through the deployment process. I don't know all the details unfortunately. I can try to find out and post back with more detail.Obelisk
M
1

we usually do this using a more customizable proxy application called Fiddler which we use to capture all the traffic sent from our brower.

Fiddler has an internal scripting language that let you make any type of check on the data passing in the Adobe Analytics call and highlight in the interface any bad call.

Metallurgy answered 8/8, 2014 at 7:28 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.