Skip to main content
All CollectionsPixel Installation
Tracking OAuth Sign-Ups Using Source Pixel
Tracking OAuth Sign-Ups Using Source Pixel

This guide will walk you through the process of handling an OAuth workflow

Updated over 4 months ago

Overview

To track user data like email or name following an OAuth sign-up, you can utilize Source Pixel. This guide provides step-by-step instructions to integrate Source Pixel effectively, ensuring you capture crucial data points during user sign-ups.

Step 1: Initialize Source Pixel

Before you begin, ensure that Source Pixel is correctly initialized on your website. Include the following script in your HTML.

Navigate to Setting in your executive Dashboard to obtain your source pixel script.

Why this is important: Initializing Source Pixel ensures that the necessary environment is set up for tracking user interactions, which is crucial for capturing data accurately.

Step 2: Triggering Source Pixel on Redirect

Trigger Source Pixel:

  • When the user is redirected back to the your website (or subdomain), the Source Pixel must be triggered on the front end using the user data obtained from OAuth, such as their email address.

IMPORTANT Pixel must also be configured for the subdomain

Click here for installing your pixel on subdomain

Step 3: Trigger Source Pixel

After the user is redirected back to the website or subdomain, you need to trigger the Source Pixel using the user data obtained from OAuth (e.g., email, name). This can be done by adding an event listener to a specific button on the page, or by triggering a custom event directly.

  • Trigger Source Pixel with a Custom Event

    Alternatively, you can directly call the Source Pixel function with the user data obtained from OAuth, bypassing the need for an event listener:

    <script type="text/javascript"> sourcePixel('event', 'customEvent', { email: '[email protected]', name: 'John Doe' }); </script>

    This approach is useful when you want to trigger the Source Pixel as soon as the user is redirected back to your site, using the OAuth data.

    Choose the method that best fits your workflow and ensure that the Source Pixel is triggered correctly to capture and track the user data.

Once the Source Pixel is triggered, the system matches the user's initial touchpoint and the email obtained from OAuth. This process links the user's first interaction with their authenticated identity, ensuring accurate tracking and data continuity.

By following these steps, you can effectively track OAuth sign-ups and ensure that all necessary user data is captured and matched within your system.

Did this answer your question?