Skip to content
  • There are no suggestions because the search field is empty.

Integrating Convert.com with AppsFlyer for Mobile Attribution

Bridge Convert.com web experiments with AppsFlyer to track installs, revenue and in-app behavior across devices.

Author: George F. Crew

 

IN THIS ARTICLE YOU WILL:

Connecting Convert.com with AppsFlyer allows you to see how your web-based A/B tests impact your mobile app ecosystem—from app installs to in-app purchases.

Because Convert.com is a privacy-first platform that does not store persistent Visitor IDs, and AppsFlyer requires an identifier to attribute events, this integration uses a Client-Side Bridge. This method passes experiment data through to AppsFlyer’s SDK or via attribution links.

How the Integration Works

Since Convert.com does not tie events to a specific user profile in its own database, the integration works by "pushing" the Experiment and Variation data to AppsFlyer at the moment the experiment is activated in the user's browser.

There are two primary ways to achieve this:

  1. For Web-to-App Flows: Appending IDs to your App Store download links.
  2. For Web-App Parity: Sending events directly to the AppsFlyer Web SDK.

Method 1: Web-to-App Link Decoration (OneLink)

If your primary goal is to see which web variation drives more App Installs, you should append the Experiment and Variation IDs to your AppsFlyer OneLink URLs.

1. Implementation Script

Add this code to your Project Global JS in Convert. It automatically finds your AppsFlyer links and appends the experiment data as sub-parameters (af_sub1 and af_sub2).

JavaScript

window._conv_q = window._conv_q || [];
window._conv_q.push([function() {
  const experiences = window.convert.currentData.experiences;
  
  for (const expId in experiences) {
    const varId = experiences[expId].variation.id;
    
    // Select all links containing your AppsFlyer OneLink domain
    const appLinks = document.querySelectorAll('a[href*="onelink.me"]');
    
    appLinks.forEach(link => {
      const url = new URL(link.href);
      // Map Convert data to AppsFlyer sub-parameters
      url.searchParams.set('af_sub1', expId); 
      url.searchParams.set('af_sub2', varId);
      link.href = url.toString();
    });
  }
}]);

2. Viewing Data in AppsFlyer

In your AppsFlyer dashboard, you can now group your Retargeting or User Acquisition reports by Sub Param 1 (Experiment ID) and Sub Param 2 (Variation ID).

Method 2: AppsFlyer Web SDK (PBA)

If you use AppsFlyer’s People-Based Attribution (PBA) to track users across web and mobile, you can send "In-App Events" directly from the browser.

1. Implementation Script

Add this to your Project Global JS. It triggers an event in AppsFlyer every time a user is bucketed into a Convert variation.

JavaScript

window._conv_q = window._conv_q || [];
window._conv_q.push({
  what: 'addListener',
  params: {
    event: 'experience.activated',
    handler: function(event) {
      if (typeof window.af === 'function') {
        window.af('event', 'convert_exposure', {
          convert_exp_id: event.data.experience_id,
          convert_var_id: event.data.variation_id
        });
      }
    }
  }
});

Important Technical Considerations

  • Anonymous Data: Convert.com does not provide a Visitor ID to AppsFlyer. AppsFlyer will use its own internal appsflyer_id to track the user.
  • Data Anonymization: If you have enabled "Data Anonymization" in your Convert Project Settings, use the numeric IDs for experiments and variations rather than names, as names may be masked for privacy.
  • Execution Order: Ensure the AppsFlyer Web SDK script is loaded before the Convert.com tracking code if you are using Method 2.

Summary Table: Data Mapping

Convert Data Point

AppsFlyer Parameter

Purpose

Experiment ID

af_sub1

Identifies which A/B test the user saw.

Variation ID

af_sub2

Identifies the specific version (e.g., Control vs. Variation B).

Experience Name

af_sub3 (Optional)

Human-readable name (only if Anonymization is OFF).

Need help testing your integration?

You can verify the data flow by checking the Network Tab in your browser's Developer Tools. Look for requests to appsflyer.com and ensure the af_sub parameters contain your Convert IDs.

Troubleshooting & QA Checklist

Before setting your experiment live, follow these steps to ensure the data is bridging correctly between Convert.com and AppsFlyer.

1. Verify Convert.com Activation

The integration only triggers when an experiment is "Activated."

  • Check the Console: Open your browser's Developer Tools (F12) and type convert.currentData.experiences.
  • Verify: You should see an object containing the Experiment ID and Variation ID you are currently bucketed into. If this is empty, the experiment may not be running or you may be excluded by targeting rules.

2. Inspect the Network Request

This is the most reliable way to confirm AppsFlyer is receiving the data.

  • Method 1 (OneLink): Click your "Download" button. Check the URL of the landing page or the redirect. Do you see &af_sub1=10012345&af_sub2=1 in the address bar?
  • Method 2 (Web SDK): In the Network Tab of your browser tools, filter by events.appsflyer.com.
    • Trigger a page refresh to activate the experiment.
    • Look for a POST request. Inside the "Payload" or "Request Body," ensure the convert_exp_id and convert_var_id are present.

3. Confirm SDK Availability

If you see the error AppsFlyer is not defined in your console:

  • Ensure the AppsFlyer Web SDK is placed above the Convert.com tracking code in your site's <head>.
  • If using a Tag Manager (like GTM), ensure the AppsFlyer tag is set to fire on "All Pages" with a higher priority than the Convert tag.

4. Check for Data Anonymization

If your AppsFlyer reports show IDs but no names (e.g., "Experiment 12345" instead of "Summer Sale Test"):

  • Check your Convert Project Settings. If "Data Anonymization" is enabled, Convert will not expose names to the JavaScript object for privacy reasons.
  • Solution: Use a mapping table or simply rely on the IDs, which are constant and unique.

5. Review AppsFlyer "Real-Time" Dashboard

  • Log into AppsFlyer and navigate to Dashboard > Activity.
  • Look for the convert_exposure event.
  • Note: It can take between 2 to 20 minutes for events to populate in the AppsFlyer dashboard depending on your account tier.