Sending Data to 3rd Parties
  • 24 Feb 2023
  • 8 Minutes to read
  • Dark
    Light

Sending Data to 3rd Parties

  • Dark
    Light

Article summary

Overview

LSVT enables users to send data collected during the checkout process via the Stripe widget to other applications, such as a CRM, marketing automation platform like Mailchimp or to track Facebook campaign conversions. This data can be valuable for various purposes, particularly if you intend to retarget potential customers who abandon the checkout process.

In this article, we will explore the process of configuring the widget to transmit data to other destinations via:


Zapier

If you're not familiar with Zapier, please review how Zapier integrates with LSVT.

  1. First, you’ll need to set up the Stripe integration for your VT system. If you haven’t done this yet, head on over to our other support article that will take you through the process.
    Stripe Integration

  2. Next, you’ll need to set up a Zapier account to receive the data and then send it somewhere else. Here is a link to Zapier’s site where you can register. https://zapier.com/

  3. Once you’ve set up an account with Zapier and logged in, you’ll want to create a zap by clicking the “Make A Zap” button. For the trigger, you’ll want to choose “Webhooks by Zapier”

make-a-zap-webhook

For the Trigger Event, you’ll choose the “Catch hook” option, then click continue.

make-a-zap-webhook-catchhook

Zapier will provide you with a “Custom Webhook URL” that you will need to copy and then paste into the webhook section of your VT system.

make-a-zap-webhook-catchhook-endpoint

After you’ve copied the webhook url, you’ll need to head on over to your VT system and add it to the list of webhook enpoints. If you’re not sure where this section is, just follow the click path below

Super User Dashboard -> Integration Management [105] -> Webhook Settings -> Choose your system.

Once you’ve arrived, scroll down the the Details section and check the box to “Send Webhooks”, if it’s not already checked. This will enable data to be sent to the webhook endpoints that you specify below.

Next, click the “Add URL” button and give it a detailed name, paste in the webhook endpoint that you copied from Zapier, and check the boxes for “Stripe Checkoutform Fill Step1, 2 and 3”. Once you’ve done that, click the “Submit” button at the bottom then click the “Save and Continue” button.

webhooks_details_section-1-1024x593

webhooks_details_section_add_url

If you scroll to the top, you will see “Webhook Testing” section that you can use to send test data to the webhook endpoints that you’ve added. The drop down menu on the left, will display all of the events that you can test and the drop down menu on the right will list all of the endpoints that you’ve added.

webhooks_testing-1024x337

When using this testing tool, you’ll be able to see the payload that is sent to Zapier. You’ll also get a response (“success” or “fail”) back from Zapier.

payload1-1024x614

payload2-1024x649

payload3-1024x658

Note:

Although the widget only has one field for the customer’s name, the name provided is actually split up into first and last name in the data that is sent. If only one name is provided, then the default for the last name will be “None”

And VOILA!! You’re now able to receive the data collected from each step of the widget. Next, you’ll need to set up the action step of the zap. Whatever you choose for the action step is where the data from the widget will be sent to. This can be a CRM, marketing software like MailChimp or just a plain old google sheet. In an abandon cart scenario, you may want to add a user to an “Abandoned Cart” list when they fill out the first step of the widget and then remove them from that list if they hit the third step of the widget because by then, you’ll know that their payment was processed successfully. You may also want to add a customer to a “Newsletter” list after they purchase and hit the third step of the widget.


Tracking Code and Pixels

The Stripe widget has a dedicated section for you to drop in custom javascript and pixel tracking code.

To add tracking code to the widget, follow the click path below:
Super User Dashboard -> [101] API Management -> Stripe Integration dropdown -> Stripe Account.

From there you’ll be brought to the setup section, you’ll have two option, Individual purchase settings which is for the B2C checkout widget, and Location purchase settings which is for the B2B checkout widget.

Click the dropdown arrow for the option you wish to add tracking code to. Towards the bottom, you’ll see a Custom JS and a Pixel Code section.

The Custom JS area is for any type of Javascript tracking code and the Pixel Code area is for all non-Javascript tracking.

In each area, you’ll be presented with a section to drop in code for each step of the checkout process.


Passing Dynamic Values

If you’re using Facebook Pixels, Google Analytics or another tracking software to track and measure conversions with the Stripe checkout widget, then we have a treat for you.

LSVT makes it easy for you to use these tracking tools with accuracy by allowing you to pass dynamic values to your tracking tools, here are some of the values that can be used.

Using Facebook pixel, as an example:

fbq(‘track’, ‘Purchase’, {
     value: sf.product.price_in_cents,
     coupon: {sf.coupon},
     contents: [{
           id: sf.product.priceId
},
          quantity: 1
     }],
     content_type: 'product'
});

If using Custom JS, do not use the opening and closing script tags to wrap your code (<script></script>)

If using the Pixel code version, you will also need to wrap dynamic parameters with curly brackets as in this example: {sf.coupon}


Custom Meta Tags

In addition to being able to specify custom meta tags to be constant with a product and sent to Stripe, you also have the ability to send in more “dynamic” custom meta tags via URL parameters.

You will need to append the URL with a parameter of mt and pass its value in this format: sub,sub_key,sub_value;cus,cus_key,cus_value

  • sub – This assigns the metatag to the subscription details
  • sub_key – Name of the meta tag that will be added to the subscription record
  • sub_value – Value for the meta tag that will be added to the subscription record
  • cus – This assigns the metatag to the subscription details
  • cus_key – Name of the meta tag that will be added to the subscription record
  • cus_value – Value for the meta tag that will be added to the subscription record

Example of how it would look, if you wanted to track a referrer and a campaign:

https://www.yourwebsite.com/stripeform_snippet.html
mt=sub,affiliate,John_smith;cus,campaign,facebook

This would be added to Stripe and presented as below:

2021-07-21_18-33-40-1536x636

2021-07-21_18-36-33-1


UTM Parameters

UTM parameters are tags that are added to URLs in order to track the performance of marketing campaigns. The acronym "UTM" stands for "Urchin Tracking Module," which was the original name for the software that is now known as Google Analytics. UTM parameters are widely used by marketers to track the performance of their online campaigns and optimize their efforts.

UTM parameters consist of a few different pieces of information that are added to the end of a URL. These include:

  • Campaign Source (utm_source): This is the source of the traffic, such as a search engine or social media platform.
  • Campaign Medium (utm_medium): This is the medium used to generate the traffic, such as a banner ad, email campaign, or social media post.
  • Campaign Name (utm_campaign): This is the name of the specific campaign or promotion.
  • Campaign Term (utm_term): This is an optional field used to track specific keywords or terms that are being targeted in the campaign.
  • Campaign Content (utm_content): This is an optional field used to track different versions of ads or content within the same campaign.

Many companies use UTM parameters to track the performance of their online marketing campaigns. Some of the companies that use UTM parameters include Google, Facebook, Twitter, LinkedIn, and many others. Examples of how UTM parameters can be used for marketing or ecommerce purposes include:

  • Tracking the effectiveness of a social media advertising campaign by adding UTM parameters to the URLs in the ads.
  • Tracking the performance of different email campaigns by adding unique UTM parameters to the links in each email.
  • Measuring the effectiveness of different landing pages on a website by adding UTM parameters to the links that lead to those pages.
  • Analyzing the performance of different paid search campaigns by adding UTM parameters to the URLs in the ads.

Add to Settings

  1. Sign in to your LSVT account and navigate to your Super User Dashboard
  2. In the 100 section on left, click on 109 Stripe Integration

  3. On the resulting screen, select the account you wish to update
  4. Choose the type of settings, e.g., Individual Purchase Settings

  1. Scroll down to the field area labeled as Url Params to store in subscription's Meta and enter the UTM parameters you wish to track, separated by a comma
    UTM

Implementation

Implementation is very simple. All that is needed is to add the parameters and associated values in the URL of the page containing the Stripe widget. The widget will capture those and pass them to the subscription meta tags in Stripe.

Below is an example format:
https://devws.lightspeedvt.com/stripe/stripeform_snippet_test_v2.html?get_user=0&utm_content=textlink&utm_source=facebook

Retrieving the data

The UTM parameters and their associated values will be stored in Stripe.com dashboard, within the Metadata section under the Subscription details.
Metadata.png

You can obtain the Metadata by subscribing to Stripe.com's webhook event customer.subscription.created which will be sent as a JSON payload to your custom app or to Zapier -> 3rd party apps.

Payload

In addition, you can export the subscription data from Stripe.com as a csv file. The file will contain the metadata.
2022-10-25_17-49-19.png


For questions or assistance, please contact us at support@lightspeedvt.com


Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.