You already know how to use a Tracking Key for Affiliates to track their promoting activities on different platforms and how to use Google Analytics and Facebook Pixel.

In this article, you'll learn how you can track where your own sales come from with the IPN and follow those data records in Google Sheets.

To enable tracking for your own sales, add the next code line to the checkout page URL of the product you'd like to track, and press Enter:

?metadata=your_tracking_key

It should look something like this:

Tracking key example configuration

Here ?metadata= is a parameter and your_tracking_key is the value that displays the source of customer traffic.

Important! Do not change the ?metadata= parameter. There should be no spaces between the question mark, the metadata word, and the value.

You can change the your_tracking_key value and use whatever tracking key you want.
It can be facebook for sales generated by Facebook, mail for sales generated via email, mylanding for sales generated at your landing page, and so on:

Facebook tracking
Email tracking
Landing page tracking

Now, switch to Google Sheets to configure the integration between CopeCart and Google Sheets.

Create a spreadsheet where you’d like all the required information to be transferred to and name it accordingly. Then, add headers to columns—these would be the parameters you're looking for.

Tracking sheet at Google Sheets

For example, let’s create a spreadsheet named “Tracking sheet” and assume that we need to track the next parameters:

  • The site that forwards traffic to your checkout page (this parameter will show where your sales are coming from).
  • Some customer data like the customer's name and email address.
  • The product name and its ID.
  • The amount paid by the customer for their order.
  • The payment status.
  • The date when the order was made.
Google Sheet example configuration

What you do next is tell Zapier, what exact thing it should react to and in what exact way.

To make Zapier know it should "listen" to your product sales process, you need to create a Webhook. In other words, you need to establish a mechanism of notifying the system that something had happened.

To do that, go to your Zapier account and follow the next steps:

  1. Go to the Zaps menu.
  2. Click on Make a New Zap button.
  3. Scroll down to Built-In Apps and select Webhooks by Zapier.
  4. Choose Catch Hook as a trigger event and press Continue.

What you just did is created a Webhook Endpoint. It is a unique address where the specific messages will be sent to when some action happens.

Next, you need to configure an IPN connection between Zapier and CopeCart so that every time when the product is purchased, CopeCart sends a notification to the Webhook Endpoint.

To do that, open your CopeCart home page in a new tab, click on your username in the upper-right corner, and proceed to the IPN connections menu:

Create and name a new Generic IPN integration:

Now you need to tell CopeCart to send notifications to the Webhook Endpoint that you have created at Zapier. To do that, simply copy the Webhook URL from Zapier to the Notification URL field at CopeCart, enter a key (the same for both CopeCart and Zapier), select the Contract fulfillment integration option and click on Save changes:

Go to the Product edit page and enable an IPN integration with Zapier:

Then, go to the product Checkout page, add the next line to the page URL, and press Enter:

?metadata=test

Next, proceed to the Test order—fill in the fields with whatever customer information you want, select a payment plan and a Test payment option, and click on Order now:

You have just completed a test order.

Now, switch to Zapier and proceed to the next step by clicking on the Continue button. You will be redirected to the test step. We strongly recommend you to proceed to test by clicking on Test & Continue.

If the integration between CopeCart and Zapier works, you will be redirected to the next step:

Next, you should configure the interface between Zapier and Google Sheets:

  1. Select the Google Sheets App.
  2. Choose the Create Spreadsheet Row as an action event and press Continue. This means that every time when a customer purchases your product, a new row appears in a specific Google Sheet with the corresponding parameters.
  3. Select the Google account (your personal or business account) where you already have created a spreadsheet as a very first step, and press Continue.

Next, you need to configure what information you'd like to be displayed at Google Sheets. Select Google Drive, Spreadsheet, and Worksheet, and proceed to configure the parameters.

Remember, you have already set the column headers, so now you should select what data from the IPN message corresponds to what column:

IPN Parameters parcing example

When you click on the Continue button, you will be redirected to another test step. Proceed to test to see if everything works right:

Test successful

Switch back to your Google Sheets to check the result (click on the image to see it full size):

Google Sheets statistics

If configurations are correct, there will be no errors, and you can turn your Zap on!

After you have enabled the Zap, every time when the product is purchased, a corresponding record appears in your spreadsheet (click on the image to see it full size):

Metadata examples

If you'd like to integrate CopeCart and Google Sheets via Zapier for other products, enable the corresponding Zapier connection for every product at a Product Edit page.

Did this answer your question?