Dan Phillips
2025-02-05 22:14:25

Creating & Implementing API Conversions

The most flexible and robust way of tracking conversion events in LeadsRx is by using the LeadsRx Open API. This is also the preferred method for capturing user profile data. You'll first create the API Conversion event in LeadsRx, then you'll implement the API conversion tracking on your website.

Create an API Conversion in LeadsRx:

  1. Go to the SETTINGS option from the gear icon at the top right of any page.
  2. In the conversion box, click MANAGE.
  3. Click TRACK A CONVERSION.
  4. Select API OR UPLOAD as the type of conversion and name the conversion.
  5. SAVE in the lower right when you are done.

In your list of conversions, you will see this newly created API based conversion event. 

  1. Click the VIEW CONVERSIONS SCRIPT link underneath the conversion name.
  2. Read and review the next page and carefully select the type of pixel desired.
  3. Make note of our anonymous options and implementation instructions.
  4. If necessary, you can share these instructions with your development team 
  5. Choose the appropriate JavaScript or Image Pixel. 

Implementing API Conversion Tracking

There are quite a few different ways to implement conversion tracking with the LeadsRx API. One of the most common methods is using Google Tag Manager and Data Layer Variables, but the implementation methodology depends on the site structure and development resources. The API is very flexible and can work with any website when properly implemented. 

API Credentials & The LeadsRx Profile Object

To find the unique API Credentials for your account select SETTINGS under the gear icon at the top right of any page and click Manage in the LeadsRx API box. 

There, you'll also find information on the LeadsRx Profile Object, JavaScript API, Server-side API access information, as well as the unique conversion IDs for the conversions for your account. 

Some Important Tips for Success:

  1. Conversion IDs:
    • Each conversion is unique and has a unique conversion ID.  Make sure you are using the correct ID when implementing different types of conversions. 
    • You can view a list of your conversion IDs by selecting MANAGE on the account Settings->LeadsRs API page.
  2. Common Merge Field Mistakes:
    • Clients often neglect to notice or replace our default placeholder values for "PUT_EMAIL_HERE".
    • Please take careful note of these merge fields and send them to LeadsRx only where appropriate.
    • The variable names found on the page must be passed to LeadsRx in the profile object properly in order for LeadsRx to receive this profile data 
  3. Deduplicating Leads:
    • Receiving the same conversion event twice can happen for a variety of reasons, but ingesting a few key values for each conversion can help LeadsRx deduplicate conversions in these instances.
    • Passing orderID, email, or userID provides LeadsRx the key critical values necessary for identifying unique or duplicate conversions. 
  4. Financial Reporting
    • If leadValue is not passed to LeadsRx, we will not be able to associate any revenue with that conversion. In eCommerce implementations, it is critical to pass this value back to LeadsRx in order to assign a monetary value to the conversion and to perform a ROAS calculation. 

Developer Resources

For more information and complete developer documentation for the LeadsRx API, refer to https://developers.leadsrx.com/reference.

 

0 out of 0 found this helpful.

Related Articles

Articles In This Folder