AdShark Conv Tracking Test Page

INSTRUCTIONS: For this exercise you'll be working out of Google Tag Manager (GTM) using the "AdShark Internal Site - Test GTM Account" account.  You should have access to it through the accounts@ login.  Read the instructions carefully and feel free to use the internet or ChatGPT to help you.

 

Google Tag Manager Overview - These are 3 main components you'll use most often within GTM:

  • Tags - this is the WHAT you want to happen on a website or page. Typically it's inserting a specific code, script, pixel, event, etc.
  • Trigger - This is the WHEN that Tag should fire or show up on a page. Sometimes it's any pageview and other times it's only after a specific action is taken on a website.
  • Variables - You'll use this less often but it's typically used when you need to pass a dynamic value with a tag. For example, purchase value anytime a purchase is made.

Helpful Tips:

  • When setting up these tag you'll want to test them to make sure they're working and were set up properly.
  • To do so create your tag and add your trigger then publish it, then use the Preview button found in the top right of GTM
  • To preview you'll type in the URL of this page and hit connect.  Now you'll be able to see the tags that have fired on the page load.
  • If you have tags that fire after specific actions then do those actions on the page that opened in a new window and you should see the tags show up after that action is taken.

Step 1: Create a new Google Tag Manager account and add it to our Internal Site

This exercise is to simulate creating a GTM container and adding it to a website or sending a client a Tag Manager script so we can setup conversion tracking on their site.

Instructions:

  • Log into Google Tag Manager with the accounts@adsharkmarketing.com login
  • At the top click on "Create Account"
  • Account Name: "AdShark Internal Test Account - [Your Name]"
  • Container name: www.adsharkinternal.com
  • Target platform: Web
  • Click "Create"
  • Copy and paste the two codes in your assignment doc. If you don't have one you can make a copy of this (Template link).
  • How to find GTM code in an existing account: Go to the container workspace in Tag Manager > AdminInstall Google Tag Manager

 

Add Your Google Tag Manager Code to our Internal Website:

  • In 1Password search "Flywheel Admin" - this is our hosting solution for the client websites we host
  • Click on the website button to open the login page
  • Use the username and password from 1password to log in
  • Once logged in search "Internal" at the very top left
  • Click on "AdShark Internal"
  • On the right-hand side you should see WP-Admin, click it (this logs you into the website backend)
  • Now click Appearance > Customize
  • Now click on the Code section the > Head Code
  • Below what's in there paste the <head> tag script you copy & pasted into your assignment doc
  • Then click the < arrow at the top left
  • Click on Header Code and below what's there paste the <body> tag script you pasted into your assignment doc
  • Then click the < arrow, then Publish.  This should install the new Tag Manager on internal website.
  • If you have the Google Tag Assistant chrome extension installed you should be able to use that and see the GTM account you created live on the website

Step 2: Set up a test tag that fires on all pages

For tag configuration use "Custom HTML" and in the HMTL code box use "<script></script>".

Step 3: Now create a tag for GA4 and add it to all pages

  • Use the GA4 account "AdShark Internal - Test Account" that you can find in Google Analytics
  • You should have access through the accounts@ login
  • For Tag Configuration you'll want to use the Google Analytics > Google Tag option
  • For the Tag ID you'll need to find the Measurement ID within the GA4 account

Step 4: Now add a tag to all pages for a Facebook Pixel

  • Use the "AdShark Test Account's Pixel" with the ID: 151288052376789
  • For Tag Configuration you'll want to use Custom HTML and find the pixel code within Facebook Events Manager
  • If you don't see the "AdShark Test Accounts's Pixel" within Facebook Business Settings then have to ask a manager to add you to it

Step 5: Set up a GA4 Event tag that fires after this form is submitted.

  • Use the same GA4 account that you added in step 3
  • For event name you can type anything so just use something think would make sense.  The event name will show up in the GA4 account 1 day after some of those events have occurred.

Tips for setting up triggers based on a form submission:

  • The most common way we'll do this is via "Element Visibility"
  • For this method you'll need to Inspect Element on a page and look at the HTML and CSS on the page.
  • In GTM you'll want to add Triggering then go to the "+" at the top right of the page and select "Element Visibility".  This is telling GTM to watch the page code for a specific CSS element, typically a Class or ID to appear.
  • Once you've selected Element Visibility the first option is selection method there are two options: ID or CSS Selector
  • We most often use "CSS Selector" because it allows you to use ID, Class, element type, data element, or a combination of these.
  • To find the CSS Element you want to use in the Element Selector field (what you want GTM to watch for) you'll need to first submit the form below and once you see the Success Message highlight it and right click, then click Inspect.
  • Now you'll want to find a unique element, typically we'll use a "class" or "id" in the code to use for the CSS Selector in the Element Selector field in Tag Manager.
  • For example if the html code is as you see in the image below, you could use the class "confirmation-success-text" or the id "confirmation-success-message" because it's unlikely either are used elsewhere on the page.
  • NOTE: When using this method on client sites you'll want to consider if this same form exists on other pages and whether or not you want to track those with the same tag or a different tag.  For example, you may want to fire different Google or Meta conversion events on different pages.  To do that you can add page path or page URL to the trigger so it only fires on certain pages.

Using an ID or Class element in the Element Selector Field:

  • For ID you must add a hashtag "#" in front of the element name
  • For Class you must add a period "." in front of the element name
  • So for the examples above if I used the class I would enter ".confirmation-success-text"
  • And if I used the ID element I would enter "#confirmation-success-message" in the Element Selector field
Screenshot 2025-09-12 at 1.05.05 PM

IMPORTANT: Inspect Element - Advanced Options

  • Anytime you're using the GTM Trigger Element Visibility you'll want to check the box for Observe DOM changes, otherwise often times it won't work
Screenshot 2025-09-19 at 9.09.25 AM
Name

Step 6: Set up a Facebook Standard Event that fires on the previous form

  • Here's a link to a list of the Facebook Standard Events
  • Use whatever event you feel makes the most sense
  • You'll need to find the script you use for Facebook events and then just replace the event name with the one you want to use.

Step 7: Set up another GA4 tag that fires after the below form submission

  • Use the same GA4 account that you added in step 2
  • For event name use what you think would make the most sense but is different from the event name of the previous form

    Step 8: Set up a Facebook Event tag that fires on the below button click

    Step 9: Set up a Google Ads > Google Tag and add it to every page on the site

    • Use the Google Ads account "AdShark - Test Mock Account"
    • You'll need to find the Tag ID which should be something like "AW-XXXXXXXXX"
    • The purpose of this tag is to allow you to do remarketing in your Google Ads account as well as track conversions

    Step 10: Set up a Google Ads Conversion tag when someone visits the page linked below

    • Thank You Page
    • To set up the Tag portion you'll need a Conv ID and Conversion Label
    • To get those you'll need to set up a new conversion goal action within the Google Ads account "AdShark - Test Mock Account"

    Step 11: Go through and test all GTM tags are firing on the right actions

    • Once in the Google Tag Manager dashboard click on the preview button in the top right
    • Type in this url: https://www.adsharkinternal.com/conv-tracking-test/
    • Click Connect
    • This should open the webpage and the Tag Assistant preview page where you can see tags when the fire
    • Move each page to a separate screen
    • Check if your all pages tags have fired: Custom HTML, Google Analytics, Facebook pixel
    • On the AdShark Internal website window you'll go through take all the actions on the page to test if the conversion tags are firing:
      • Submit the form
      • Test the button click
      • Open the thank you page
      • All the tags you set up should have fired after that