Blog Viewer

Python for Adobe Analytics audit and regression testing

By Abhinav Sharma posted 04-04-2018 06:34 AM

  
Hello everyone,

In continuation with my efforts to understand more and more about web analytics auditing culture and best practices... I would like to share this basic automation tip with everyone. It would be great to have some feedback from the readers -

With Python, it’s possible to build automation scripts that would allow you to do quick regression testing of your Adobe Analytics tags. It’s an excellent option when you don’t have access to enterprise data quality auditing tools like ObservePoint (which is recommended best practice) and the task is not practical for manual testing.

How does it work –

The script will start with a single base url. Through the base url, it would launch all (or specified) links present on the page and record the tag variables fired on those specific links. The script framework that I am sharing below can be customized as per the testing needs. It’s especially helpful if you have made changes in limited number of pages and want to test –

  • All the links are tagged and if the events associated with the links are firing properly.
  • If the content grouping is set correctly and setting up all the variables as desired. For example, all the sections and sub sections in main navigation.
  • To verify if url query parameters are reported as separate pages or otherwise.
  •  Cross domain tracking

Modules -

Script begins with importing all the modules required for web scraping. I will be using following modules

  • Requests - Downloads files and web pages from the Internet.
  • Beautiful Soup - Parses HTML, the format that web pages are written in.
  • Selenium - Launches and controls a web browser. Selenium can fill in forms and simulate mouse clicks in this browser.
  • Sleep – optional, just in case you want to give some time before each link loads.

Read more about the script structure in my linkedin article here. You can also try the code by downloading it from github here.

#AdobeAnalytics
#Audit

Permalink

Most Recent Blogs

Log in to see this information

Either the content you're seeking doesn't exist or it requires proper authentication before viewing.