Skip to content

Direct Offer Tracking (OmniSDK)

This guide walks you through setting up conversion tracking using MomentScience OmniSDK. By following these steps, you will be able to track user...

Overview

This guide walks you through setting up conversion tracking using MomentScience OmniSDK. By following these steps, you will be able to track user interactions and conversions effectively.

Prerequisites

Before you begin, ensure you have:

  • Your SDK ID (get it from your MomentScience contact)
  • Your Landing page URLs
  • Your Conversion page URLs

Integration Steps

Step 1: Add the MomentScience OmniSDK Script

The OmniSDK script must be included on all landing pages and conversion pages.

  1. Open the HTML <head> section of your website.

  2. Insert the following script:

    <!-- Replace YOUR_SDK_ID with the SDK ID your MomentScience contact gave you. -->
    <script src="https://plugins.pubtailer.com/omnisdk.js?accountId=YOUR_SDK_ID"></script>

✅ This ensures that the SDK is available for tracking user events.

Step 2: Capture Click IDs on Landing Pages

This step ensures that any click identifier (adpx_click_id) from the URL query string is captured and stored in a cookie for later use.

  1. Open your landing page’s HTML <body> section.

  2. Insert the following script:

    <script>
      // Reads adpx_click_id from the URL and stores it in a cookie
      // so the conversion page can read it later.
      handleAdpxClickId();
    </script>

✅ This ensures proper tracking of user interactions from the initial click.

Step 3: Implement Conversion Tracking on Key Event Pages

On conversion pages (e.g., checkout confirmation, signup success), insert the following script to track successful events.

  1. Open your conversion page’s HTML <body> section.

  2. Insert the following script:

    <script>
    (async () => {
        const eventName = 'purchase';  // Replace with actual event name
        const sale_amount = 0;  // Replace with actual sale amount if applicable, otherwise leave as is
        // Retrieve stored click IDs  
        const mosciClickId = getCookie('mosci_click_id');
        // Send conversion data to MomentScience  
        await trackMoSciEvent(mosciClickId, eventName, sale_amount)
            .then(() => console.log('MomentScience tracking successful'))
            .catch(error => console.error('MomentScience tracking failed:', error));        
    })();
    </script>

Customization Options:

  • Event Name: Change 'purchase' to reflect the event (e.g.,'signup','lead').
  • Sale Amount: Set the value of the conversion (e.g., 5.00 for a $5.00 transaction).

📌 How this works:

  • Retrieves stored click IDs from the cookie.
  • Sends the event details to MomentScience for tracking.

✅ This ensures conversions are attributed correctly.

Final Checklist

  • Step 1: The OmniSDK script is included on all pages.
  • Step 2: Click tracking is implemented on landing pages.
  • Step 3: Conversion tracking is firing correctly on event pages.
  • Step 4: Event names and values are set correctly.

Conclusion

By completing these steps, you have successfully integrated MomentScience conversion tracking into your website. This setup enables accurate conversion tracking while maintaining a lightweight and scalable implementation.


📢 If you’re running into any issues while going through the integration process, feel free to contact us at help@momentscience.com

Type to search…

↑↓ navigate↵ selectEsc close