Using Python to enhance & automate measurement

Recently I’ve started to find more and more use cases for Python in digital marketing measurement.

Below is a list of example applications:

  1. Scraping data from the web and storing the results in a google doc with the Python script set to run nightly on a schedule. Sometimes there isn’t a datastudio connector or an API. Scraping the data into a google spreadsheet gives you a regularly updated data source that plugs straight into Datastudio.

 

  1. Scraping data from Trustpilot reviews and building personas based on the language used in customer reviews.
  2. Accessing Google Search console data through the API and storing this data in a database. Google Search console only shows 90 days of data making it difficult to see the trend or do year on year comparisons.
  3. Automating the testing of an ecommerce site i.e. testing a channel is recorded correctly, the transaction tag fired and the transaction appeared in Google Analytics with the correct data.
  4. Scraping price data from a competitors website to keep an eye on how they compare.
  5. Cleaning data i.e. backend database
  6. Scraping news data to make PPC ad copy dynamic and highland relevant