Workify is a single-page application (SPA). To install a Facebook Pixel on your marketplace, you'll need to use Google Tag Manager (GTM).
This post assumes you already have a Facebook Pixel and a Google Tag Manager account.
Create Trigger Event
Step 1
Inside Google Tag Manager, create a 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.
Step 3
Click Triggers and then New to create a new trigger.
Step 4
Give the Event a name like Page Route and select Custom Event as the trigger type.
Step 5
Add nuxtRoute as the Event name and click save. Now you're ready to add tags.
Tags
Step 1
Click New Tag and give it a name like Custom HTML.
Step 2
Under Tag Configuration, select Custom HTML.
Step 3
Add this script, then check the box for Support document.write.
<script> (function() { console.log('page-changed'); })(); </script>
Step 4
Under Triggering, choose Page Route, which is what you created in the previous section.
Step 5
Click Save.
Add Facebook Pixel
Step 1
Click New to create a new tag. Give it a descriptive title like Facebook pixel.
Step 2
Under Tag Configuration, choose Custom HTML.
Step 3
Paste the Facebook Pixel code into the HTML field.
Step 4
Under Triggering, choose Page Route and click Save.
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 facebook pixel." Click Publish.
Adding Google Tag Manager to Workify
Now that you've set up Google Tag Manager with your Facebook Pixel code, the final step is to add your 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.
Step 2
Alternately, you can find it from the Admin view.
Step 3
Visit the Storefront tab on your dashboard, then click the Tracking Scripts option.
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.
* 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.