Workify

Add Google Analytics to your market

Workify is a single-page application (SPA). To install Google Analytics (GA) on your marketplace, you'll need to use Google Tag Manager (GTM). Google offers two options for analytics and this post covers both:

  1. Universal Analytics
  2. GA4

This post assumes you already have a Google Analytics account and an analytics property with Universal Analytics, GA4, or both, and a Google Tag Manager container.

Create Event Trigger

Step 1

Inside Google Tag Manager, create a new container.

Google tag manager dashboard create new container

Step 2

Give the container a name and select Web as the target platform. Click Create. After clicking create, a window will display instructions for installing GTM. Close it. You don't need to do that at this phase.

Google tag manager dashboard create container window

Step 3

Click Triggers and then New to create a new trigger.

google tag manager click triggers

google tag manager click to create new trigger

Step 4

Give the Event a name like Page Route and select Custom Event as the trigger type.

google tag manager dashboard create custom event

Step 5

Add nuxtRoute as the Event name and click save. Now you're ready to add tags. 

google tag manager create new trigger configuration window

Tags

Step 1

Click New Tag and give it a name like Custom HTML.

google tag manager create new tag

google tag manager dashboard create new tag window

Step 2

Under Tag Configuration, select Custom HTML.

google tag manager dashboard click custom HTML

Step 3

Add this script, then check the box for Support document.write.

<script>
  (function() {
    console.log('page-changed');
  })();
</script>


google tag manager tag configuration window paste HTML

Step 4

Under Triggering, choose Page Route, which is what you created in the previous section.

google tag manager click page route

Step 5

Click Save.

Add Google Analytics - Universal Analytics

Step 1

Click New to create a new tag. Give it a descriptive title like Google Analytics - UA. 

Step 2

Under Tag Configuration, choose Google Analytics: Universal Analytics.

google tag manager click google analytics universal analytics

Step 3

Choose Enable overriding settings in this tag then enter your Google Analytics ID. You'll find this in your Google Analytics property. 

google tag manager dashboard tag configuration window

Step 4

Under Triggering, choose Page Route and click Save.

google tag manager dashboard click page route

Step 5

Click Submit in the upper right-hand corner of the dashboard. Then, provide a version name and version description. i.e. "v1" and "added google analytics." Click Publish.

google tag manager publish changes

google tag manager dashboard publish changes

Add Google Analytics - GA4 Configuration

Step 1

Click New to create a new tag. Give it a descriptive title like Google Analytics GA4 Configuration.

Step 2

Under Tag Configuration, choose Google Analytics: GA4 Configuration.

google tag manager dashboard click google analytics GA4 configuration

Step 3

Under Tag Configuration, enter the GA4 ID found in your Google Analytics property. Under Triggering, choose Page Route. Click Save.

google tag manager tag configuration window

Step 4

Click Submit in the upper right-hand corner of the dashboard. Then, provide a version name and version description. i.e. "v1" and "added google analytics - ga4." Click Publish.

google tag manager dashboard publish changes


Adding Google Tag Manager to Workify

Now that you've set up Google Tag Manager with your Google Analytics information, the final step is to add the Google Tag Manager ID to your Workify storefront. The ID will always begin with the letters GTM.

Step 1

From the Workspace view, the ID is placed near the top of the page.

google tag manager dashboard ID

Step 2

Alternately, you can find it from the Admin view.

google tag manager dashboard admin tab ID

Step 3

Visit the Storefront tab on your dashboard, then click the Tracking Scripts option.

Workify dashboard storefront tracking scripts tab

Step 4

Use the Google Tag Manager ID field to add your unique GTM ID. i.e. GTM-XXXXXXX. Click Save Settings to save your changes.

Workify dashboard tracking scripts field


* If you're having difficulty with the Tracking Scripts page not loading, please make sure you do not have ad blocking enabled in your browser. If you have an ad blocker extension enabled or if you're using a browser with built-in ad blocking, this page will not load. Please disable ad blocking for the Workify website so you can view the Tracking Scripts page correctly. 

* Please note: We do not offer support for any third-party tracking scripts.

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.