Has anyone had success tracking file downloads using Webflow and Google Tag Manager?

Published on
September 22, 2023

Yes, it is possible to track file downloads using Webflow and Google Tag Manager. By implementing proper tracking codes and triggers, you can accurately measure the number of times files are downloaded on your website. Here is a step-by-step guide on how to set it up:

  1. Set up Google Tag Manager:
  • Sign in to your Google Tag Manager account or create a new one.
  • Create a new container and add the generated code to your Webflow site before the closing </head> tag.
  1. Create a Tag for File Download Tracking:
  • In Google Tag Manager, navigate to the container and go to "Tags".
  • Click on "New" to create a new tag.
  • Give your tag a descriptive name like "File Download Tracking".
  • Select "Tag Configuration" and choose "Universal Analytics" as the tag type.
  • Configure the tag by entering your Google Analytics tracking ID.
  • Under "Track Type", select "Event".
  • Set up the following fields:
    • Category: File Downloads
    • Action: {{Click URL}}
    • Label: {{Click File Name}}
  • Save your tag.
  1. Create a Trigger for File Downloads:
  • Go to "Triggers" in Google Tag Manager and create a new trigger.
  • Select "Click - Just Links" as the trigger type.
  • Under "This trigger fires on", select "Some Link Clicks".
  • Set up the following conditions:
    • Click URL contains your file extension (e.g., .pdf, .docx, .xls)
    • Click URL does not contain external website addresses (if desired)
  • Save your trigger.
  1. Enable File Download Tracking:
  • Go back to "Tags" and edit the File Download Tracking tag.
  • In the Triggering section, select the trigger you created for file downloads.
  • Save the tag.
  1. Publish Your Changes:
  • Click on "Submit" on the top right corner of Google Tag Manager.
  • Name your version and describe the changes.
  • Finally, click on "Publish" to publish your changes.

Now, whenever a user clicks on a link to download a file with the specified file extensions, the event will be sent to Google Analytics. You can see the file downloads in Google Analytics by navigating to Behavior > Events > Top Events > File Downloads.

It's important to note that tracking file downloads using this method might not be 100% accurate. Some browsers and ad-blockers can interfere with the tracking. Additionally, if someone directly accesses the file URL without clicking a link on your website, it won't be counted.

Additional Questions:

  1. How can I track file downloads using Webflow and Google Tag Manager?
  2. Can I measure the number of times files are downloaded on my Webflow website?
  3. Is it possible to track downloads of specific file types using Google Tag Manager in Webflow?