
Does your client’s website allow users to create accounts?
Do you want to track these account creations using Google Tag Manager?
Here’s how to do it, using the referrer variable:
When you’re done, book a free call with us to set up conversion tracking on all your clients’ ad platforms.
- Create a New Tag in your Google Tag Manager Workspace
- Open up your client’s Google Tag Manager workspace.
- Navigate to Tags.
- Click “New”.

- Name your tag.
- Click the Tag Configuration box.
- Select Google Analytics → GA4 Event.

- Paste your client’s GA4 Measurement ID, or select their Google Tag constant.
- You can find the GA4 Measurement ID in Google Analytics → Admin (bottom left gear icon) → Data streams. Here’s where you see it:

- Name your event.

- Click the Triggering Box.
- How you build your trigger depends on how users create accounts on the website.
- We are going to use the “Referrer” variable to track signups.
- The Referrer variable tracks the previous page the user visited. So, the page they were on before the current one they’re on.
Most websites have a “/account/register” page where users sign up for an account.
Here are several examples of account creation flows, one on a university website, and another on an ecommerce site.


Depending on the website, users may have to complete another step, such as setting a password or entering a PIN, before fully completing account creation.
We want to use the final page of the signup process as our referrer variable when we make our trigger.

After completing a signup, users are typically redirected to an account home page, or the home page of the site.
We can use this page as our page URL variable when making our trigger.


We can use this account creation flow to set up our trigger.
- In Triggering, click the + in the right corner.

- Name your trigger.
- Click the Trigger Configuration box.
- Click the “Window Loaded” trigger type.

- Create a new condition that sets the Page URL equal to (or contains) the URL of the page the user goes to after completing account creation.
- Create a second condition that sets the Referrer equal to (or contains) the URL of the final page in the account creation process.
Some websites give uers unique URL’s when creating an account or on their new account page, but the beginning of the URL is usually the same.
- If you notice this is the case on your client’s website, use the CONTAINS condition in your trigger, and paste the URL up until the “?” that begins the unique part of the URL (SEE SCREENSHOT BELOW)

If every account creation uses the same URL (example below), use the EQUALS condition in your trigger.

Save your trigger and tag. Now, we will use Preview mode to make sure your tag works.
2. Test your Tag Using Tag Assistant
- Go back to your Google Tag Manager workspace.
- Click Preview in the top right corner.
- Enter your client’s website URL.

- Create an account as if you’re an user.
- When finished, open the “Tag Assistant” tab Google Tag Manager created for you in your browser.
- Navigate to the most recent “Window Loaded” event in the left column of Tag Assistant.
- You should see your Account Creations tag under the “Tags Fired” section.

Troubleshooting
- If your tag is under the “Tags Not Fired” section, click on the tag.
- Look at the “Firing Triggers” section.
- It will tell you which Referrer and Page URL Google Tag Manager picked up.
- If there is an “X” next to the condition, it means the URL you set did not match what was performed by the user (you).

- You can use this section to fix your trigger and make sure it fires on the right URL.
- You can also close this section and navigate to “Variables”.
- The “Variables” section will show you all of the data that was collected during your “Window Loaded” event, including the Referrer and the Page URL.
- You can use this data to fix your trigger if needed.
Final Note: This Method is Not Foolproof
- If an user navigates back and forth between account creation pages, this may cause the tag to fire, even if the user did not, or already, created an account.
- For example, if an user is typically redirected to the home page after finishing account creation, IF they go directly to the home page from the signup page for any reason other than finishing signup, the tag will fire.
- WHY? Because Google Tag Manager will pick up the home page as the page URL, and the account creation page as the Referrer.
Using the referrer variable is an easy way to track account creations using Google Tag Manager, without having to install form submission event listeners.
If you have any questions, comment them down below, or book a free call with us to see what other kinds of tracking we can help you install at your agency.