Skip to main content

Sonar Optimize: Data Enrichment for Twitter (X)

Sonar sends enriched first-party customer and conversion data to Twitter (X) Ads to improve targeting and boost campaign ROI.

R
Written by Rishi Kapadia

Overview

With Sonar Optimize, Triple Whale integrates directly with Twitter (X) Ads to automatically send enriched, first-party data via the Twitter Conversions API. Connect Sonar Optimize to your Twitter Ads account and achieve a complete picture of the customers, interactions, and web conversions of your website. Follow this guide to track relevant conversions from your store and optimize your Twitter Ads campaigns based on real-time data.

Note: Headless Shopify stores as well as stores built on BigCommerce or WooCommerce will require developer implementation in order to enable Sonar Optimize. See the relevant documentation:


Configuring Sonar Optimize

To begin setup, navigate to Data → Sonar Enrichment → Integrations in the Triple Whale sidebar. Locate the Twitter tile and click Connect. Then click Save and Continue to begin the self-setup wizard.

The setup wizard is divided into three steps, followed by one additional configuration step:

  1. Connect to Twitter

  2. Send Events for Enrichment

  3. Exclude Events for Enrichment

  4. Map Web Event Tags


Step 1: Connect to Twitter

Enable Pixel Components

Before connecting your Twitter account, ensure the following Triple Pixel options are enabled:

  1. Enable Triple Pixel Theme App Embed (required)

  2. Enable the Triple Pixel Web Pixel Extension (recommended)

Both options should display an Enabled badge on the setup screen. If you are running a headless Shopify setup, you will need to modify your Triple Pixel snippet using the following instructions.

Connect Your Twitter Account

Click the Connect button next to the Twitter logo. A dialog will appear letting you know you are being redirected to Twitter to connect your account.

You will be taken to Twitter's authorization page, where Twitter will ask you to grant Triple Whale the following permissions:

  • See Posts from your timeline (including protected Posts) as well as your Lists and collections

  • See your X profile information and account settings

  • See accounts you follow, mute, and block

  • See, create, and manage your advertising data including: Campaigns, Audiences, Business and ad account information, Ad account and user settings, and Creatives and media

Click Authorize app to grant access.

Activate Your Ad Account

After authorizing, you will be redirected back to Triple Whale. A Manage Twitter Connection dialog will appear, showing your connection status and available ad accounts.

  • Your Token Connection Status should display as Active (green).

  • Under Accounts, locate the Twitter Ads account you want to connect and toggle it on to activate it. The status will change from Inactive to active.

A confirmation dialog will appear: "Are you sure you want to connect this account? Data will begin flowing into Triple Whale." Click Confirm to proceed.

Your account will now show as enabled and will begin backfilling historical data.

Now close out of this pop-up by clicking "X" on the top right.

Tip: If you want to connect a different ad account that is not listed, click Disconnect and reconnect, then select the desired account during reconnection.

Select Your Twitter Pixel Destination

Once connected, you will be returned to the main setup page. Your Twitter connection will now show a status message (e.g., "Importing your data | Whale Watchers") with Manage and Disconnect buttons.

From the Twitter Pixel Destination dropdown, select the Twitter Ads account you want to use for pixel data (e.g., Whale Watchers (18ce55um8gc)).

Once your Twitter account is connected and your Pixel Destination is selected, the Save and Continue button will become active. Click Save and Continue to proceed.


Step 2: Send Events for Enrichment

Select which events you want Triple Whale to send to Twitter for enrichment. The following Standard events are available (and recommended):

  • Page View

  • View Content

  • Search

  • Signup

  • Add to Cart

  • Initiate Checkout

  • Add Payment Info

  • Purchase

For optimal results, we recommend enabling all standard events. Each event type can be individually toggled on or off based on your campaign needs.

Once you have configured your event selection, click Save and Continue to proceed.


Step 3: Exclude Events for Enrichment

By default, any purchase event sent to Twitter will be used to measure and optimize your campaigns. To avoid sending purchase events unrelated to your Twitter campaigns, you can configure exclusions on this page.

Exclude Recurring Subscription Purchases (Recommended)

If your shop offers subscription orders, add your Recurring Subscription Order Tag to ensure that repeat subscription purchases are excluded from being sent to Twitter.

Exclude Purchases by Order Tags

You can also exclude specific purchase events based on Shopify order tags. Search for and select the tags you want to exclude.

Exclude Channels (Recommended)

Triple Whale excludes certain Sales Channels by default from the conversion events that it transmits (draft orders, PoS orders, returns, and shop app orders). You can also exclude additional channels. Pre-configured exclusions may include channels like SHOPIFY_DRAFT_ORDER, POS, and others.

Exclude Custom Sales Channels

To exclude a custom sales channel, click + Add Sales Channel and provide the channel name and channel code. If you're unsure about your channel code, reach out to Triple Whale support.

Once you have configured your exclusions, click Done to complete the setup wizard.


Step 4: Map Web Event Tags

After completing the setup wizard, there is one additional step unique to the Twitter integration: mapping your Sonar events to Twitter Web Event Tags. This is done from the Integration Settings page, not from the setup wizard.

Navigate to Sonar → Integration Settings and locate the Standard Events table. You will see all active events alongside a Web Event Tag column. Events that have not yet been mapped will show click to set.

Click click to set next to any event to open the mapping modal.

In the modal, either:

  • Choose an existing Web Event Tag from the dropdown if you have already configured conversion events in your Twitter Ads account, or

  • Click + Create a new event to create a new one directly from Triple Whale.

Creating a New Web Event Tag

If creating a new event, fill in the following fields:

  • Name — Give it a clear, descriptive name (e.g., View Content (Triple Whale))

  • Event type — Auto-populated based on the Sonar event you are mapping (e.g., View Content)

  • Attribution window

    • Post-engagement attribution window: choose your preference

    • Post-view attribution window: choose your preference

  • Website activity audience - Toggle on to track and build audiences of users who complete this event, allowing you to retarget them using the X Pixel.

Click Save to confirm. Repeat this process for each event you want to map. It is recommended to map all events; however, the “Purchase” event will most likely be the primary event you optimize for.

Note: It is recommended to map all events; however, prioritize key events for campaign optimization, such as Purchase and Add to Cart.


Delivery Overview

Once Sonar Optimize is enabled for Twitter, you can monitor data transmission within Triple Whale. In Sonar Settings, click Delivery Overview to access the Delivery Overview page. Here, you will see a data table that displays the total number of enriched events, broken out by event type over the chosen time frame. This tells you what data Triple Whale is broadcasting to Twitter.


Monitoring Results

After connecting the integration and sending data for a few days, monitor your Twitter Ads performance for the following improvements:

  • Lowering CPAs

  • Improving ROAS

  • Closer alignment between Twitter in-platform reporting and Triple Whale reporting


Frequently Asked Questions

1. What event types does Sonar Optimize enrich for Twitter? Sonar Optimize will send and enrich standard Twitter web pixel events: Page View, View Content, Search, Signup, Add to Cart, Initiate Checkout, Add Payment Info, and Purchase.

2. Do I need to create new Web Event Tags, or can I use existing ones? You can use existing Web Event Tags from your Twitter Ads account if you already have them set up. If not, you can create new ones directly from the Integration Settings page in Triple Whale. We recommend naming them clearly (e.g., Purchase (Triple Whale)) so they are easy to identify in your Twitter Ads Manager.

3. Should I enable Sonar Optimize if I already have another CAPI service connected to Twitter? We do not recommend running multiple CAPI services simultaneously. Using multiple CAPI setups can result in duplication of events, which degrades optimization and inflates reporting. Instead, we recommend disabling any existing CAPI connections and moving over to Triple Whale's Sonar platform entirely for your Twitter (& other platform) server-side event tracking.

4. Why do I need to map Web Event Tags separately after the setup wizard? Twitter requires conversion events to be explicitly linked to Web Event Tags in your Twitter Ads account. This mapping step ensures Triple Whale sends enriched data to the correct conversion event in Twitter's system, enabling accurate attribution and campaign optimization.

Did this answer your question?