Setting up a Link Click Trigger to match URLs containing “pdf” is the cleanest way to track PDF Downloads on your website. With the trigger in place, you’ll want to fire a “pdf download” event to Google Analytics, GA4, and/or another platform.
Step 1: Create The Link Click Trigger

- Click on “Triggers” in the left navigation and then click on the light blue “New” button in the top right corner.
- Name the trigger. I recommend starting with “LinkClick” for all Just Links Triggers and then defining the type of link it fires on – ex. PDF Downloads.
- Click on “choose the trigger type” and click on “Just Links” under the Clicks sub-menu.
- Set the trigger to fire on “Some Link Clicks” by clicking the radio button.
- Select the “Click URL” > Contains > and then enter “pdf” into the match field.
- If you don’t see “Click URL”, click on Choose Built In Variable and find it in the list. Or go to the Variables Page, Click Configure, and select all of the Click Elements.
- Click Save. (You’ve created the trigger)
Step 2: Create The PDF Download GA Event Tag

- Click on “Tags” in the left navigation and then click on the light blue “New” button in the top right corner.
- Name the Tag. Previously I was starting all of these tags with “GA Event – ” but recently I’ve updated that to GA3 to clarify. And then name the event.
- Click on “Choose a tag type to begin” and select “Google Analytics: Universal Analytics”
- Change the Track Type to “event” in the drop-down.
- The Category, Action, and Label are the event naming conventions in Universal Analytics. Below is my recommended naming convention for this tag type.
- Category: Name it what it is, in this case, “pdf_download”
- The underscore is optional, but having everything lowercase is recommended.
- Action: I recommend using the “Click Text” which should show the actual text clicked on. If there was a button that said “download now,” we’ll receive that, but if the link has the file’s name, that will be collected instead.
- This can be customized based on your site. Review the PDFs and modify them as needed.
- If you don’t see “Click Text” in the drop-down, click on the “+” icon to the right of the field, click “Built-Ins” in the top right corner, and then select “Click Text”
- Label: I usually pass through the Click URL, which shows the full URL of the PDFs location. Look at the bullet point above if you don’t see Click URL in the list.
- Value: None. If you have a reason to add it, do it – but my recommendation is none.
- The benefits of the above naming conventions are that you can review PDF downloads at whatever level you need.
- By viewing the total for the “pdf_download” category, you’ll see how many total pdf downloads occurred on the site.
- But by digging into the Action and/or Label, you can view them broken out by CTA and Individual PDF File.
- You can also layer in other dimensions within Google Analytics, such as the page, device, traffic source, etc. This will help you make the most of your data.
- Category: Name it what it is, in this case, “pdf_download”
- Select your Google Analytics Settings Variable from the drop-down. If you need to create one, click “New Variable” in the drop-down.
- Add the Trigger you created in Step 1, and click Save in the top right corner.
Step 3: Create The PDF Download GA4 Event Tag
Before creating this tag, it’s important to note that GA4 tracks File Downloads automatically. If you have a reason to track beyond that, continue with this section.

- Click on “Tags” in the left navigation and then click on the light blue “New” button in the top right corner.
- Name the Tag. I recommend “GA4 – ” followed by the interaction.
- Click on “Choose a tag type to begin” and select “Google Analytics: GA4 Event”
- Select your GA4 Config tag in the drop-down. Or click on New Tag to create one.
- Name the event. I recommend pdf_download.
- Parameters are comparable to Dimensions in GA3. You can add more, but at a minimum, I recommend adding “link_text” and “link_url” – these are existing parameters that align with the Action and Label we used in GA3.
- If this is a conversion, you can add this as one inside of GA4.
- Add the Trigger you created in Step 1, and click Save in the top right corner.
Step 4: Test and Publish GTM Container
- Click on Preview in the top right corner. Enter your site and test a PDF download. You should see both tags fire.
- If everything looks good, click Submit in the top right corner to publish the container to the live site.