Home » how to » Page 2

how to

Track ‘Dark Theme’ in Google Analytics 4 (GA4 and GTM)

  • by
  • 2 min read

In this blog post, we’ll use media queries particular user (device) properties using Google Tag Manager and Google Analytics 4. Some JavaScript knowledge is not a luxury. Using media queries, developers can personalize their app or website based on device and personal preferences by the user. Using the matchMedia method… 

Solve Pandas “ValueError: cannot reindex from a duplicate axis”

Recently, I’ve been working with Pandas DataFrames that had a DateTime as the index. When I tried reindexing the DataFrame (using the reindex method), I bumped into an error. Let’s find out what causes it and how to solve it. The Python error I’m talking about is: A “duplicate axis”?… 

How to read ZIP files in R

In this blog post I discuss how you can load compressed CSV files, such as .zip and .tar.gz. Nowadays, many packages support it and we’ll go over the different methods. When data sets are ping-ponged across an organization, in order to limit network and storage usage, they often come in… 

Solve “Error parsing parameter … : Expected: ‘=’, received: ‘EOF’ for input:” in AWS CLI

  • by
  • 1 min read

The following error might occur when you would like to pass the contents of a file to an AWS CLI command. Amazon web services has very strict rules regarding referring to file contents. When you refer to the content of a file you need to use the file:// protocol. The… 

Send Optimizely Experiment and Variation to GA4 via GTM

  • by
  • 4 min read

Optimizely is an amazing product for running experiments on your digital platforms. However, their documentation is somewhat outdated. In this blog post I would like to elaborate on how to send Optimizely’s experiment ID and variation ID to Google Analytics 4 in an event parameter. Judging from the screenshots, Optimizely’s…