Skip to main content

Setting Up Tracking on Third-Party Landing Pages or Domains Different from Your Primary Store Domain

Updated over a week ago

If you're sending traffic from your ad platform to third-party domains that are not your Primary Store (Shopify or Custom Built Website), your sales data might be missing valid attribution tracking. This guide helps you to setup WorkMagic Pixel on your third-party landing page to preserve UTM tags and enables accurate attribution tracking.

Step 1 - Understanding Setup Status

When you go to Settings -> Tracking settings -> Landing page domain, you’ll see a Setup Status table for each connected platform.

Column

Description

Platforms

The ad or sales channel integrated with WorkMagic (e.g., Meta Ads, Google Ads, Shopify).

Landing page domain

The domain(s) detected for that platform’s campaigns. This can be your main store domain or third-party domains/subdomains.

Number of campaigns

How many active campaigns on that platform are using the detected landing page domain.

Validation

Shows whether WorkMagic can attribute traffic for that domain: • Valid for attribution tracking -> Pixel and tracking setup are correct. • Invalid for attribution tracking -> Tracking setup is incomplete or parameters are not passing correctly. • Not connected -> The platform is not yet integrated with WorkMagic or no data is detected.

Validation status:

  • Green “Valid”: No action needed for that platform/domain.

  • Yellow “Invalid”: Check your pixel installation, link parameter passing, or follow the third-party landing page setup steps below.

  • Grey “Not connected”: Integrate that platform first from the Integrations tab.

Step 2 - Enabling Third-Party Landing Page Tracking

  1. Go to SettingsTracking settings.

  2. Under Landing page domain, scroll to Third-party landing pages.

  3. Select Yes when asked:

    "Do you have any third-party landing pages or other pages hosted on a sub-domain or different domain?"

  4. Switch to the Pixel installation tab.

Step 3 - Installing Utility Functions

WorkMagic provides JavaScript functions to ensure tracking parameters (UTMs) pass between domains.

  1. Copy this script into your third-party landing page before the closing </body> tag:

    function getUrlParams() { return window.location.search.replace(/^\?/, ''); } function concatLinkWithParams(url, params) { var separator = url.includes('?') ? '&' : '?'; return `${url}${url.endsWith('?') || url.endsWith('&') ? '' : separator}${params}`; } function isOutsideLink(link) { if (!link.startsWith('http')) return false; const url = new URL(link); return url.hostname !== window.location.hostname; } function setParams2Links(runOnlyOutside = true) { const links = document.querySelectorAll('a'); const params = getUrlParams(); links.forEach(link => { const href = link.getAttribute('href'); if (!href) return; if (runOnlyOutside && !isOutsideLink(href)) return; link.href = concatLinkWithParams(href, params); }); }

  2. Add this to trigger it on page load:

    document.addEventListener('DOMContentLoaded', function() { setParams2Links(); });

  3. For JavaScript-based redirects:

    window.open(concatLinkWithParams(targetURL, getUrlParams()));

Step 4 - Validating the Setup

Realtime Checker

  1. Go to Debug tools.

  2. Enter a third-party landing page URL with links to your store.

  3. Click those links, counting your clicks.

  4. Click Finish in WorkMagic’s popup.

  5. If counts match, your Pixel is correctly set.

UTM Checker

  1. In UTM checker, enter the Page/Refer URL and UTM parameter (e.g., utm_campaign=flashsale).

  2. Click Check to see if recent visits are missing that parameter.

  3. Use the chart and list to troubleshoot.

Step 5 - Optimization Tips

  • Check validation regularly in the Setup Status table to detect issues early.

  • Always test new third-party domains with the Realtime Checker before running live campaigns.

  • Use consistent UTMs across all campaigns to keep attribution clean.

  • Keep scripts lightweight and ensure they run without console errors to avoid breaking tracking.

  • Revalidate after changes to landing page layouts, scripts, or URL structures.

Step 6 - Issue Resolution Guide

If validation shows “Invalid for attribution tracking”:

  • Confirm the utility script is added and running on the third-party page.

  • Make sure URL parameters are passed correctly when clicking to your store.

  • Verify the WorkMagic Pixel is installed on your main store’s landing page.

If validation shows “Not connected”:

  • Connect the platform in Settings → Integrations.

  • Refresh the Setup Status after integration.

If parameters are missing in UTM Checker:

  • Review campaign URLs to ensure required UTMs are included.

  • Check for redirects that strip query parameters and adjust accordingly.

  • Re-run the test after fixes.

Did this answer your question?