Skip to main content
Sales Tracking

IPN tracking, Google Analytics, Facebook Pixel, Tracking

Irina Zaiats avatar
Written by Irina Zaiats
Updated over 3 months ago

Discover how tracking keys for affiliates can help you better track the results of your ads on various platforms, including Google Analytics and Facebook Pixel.

In this article, learn how you can use IPN to find out what sources your own sales are coming from and track them in Google Sheets!

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

?metadata=dein_trackingschluessel

After that, your URL will look like this:

Here "?metadata=" is a parameter and "your_trackingkey" is the value that indicates the source of customer traffic.

Important: The ?metadata= parameter must not be changed. There must be no space between the question mark, the word "metadata" and the value.

You can change the value your_trackingkey and use any tracking key you want. For example, you can use Facebook for sales generated through Facebook, mail for sales generated through email, mylanding for sales generated on your landing page, and so on:

Now explore how you can connect CopeCart and Google Spreadsheets using Google Spreadsheets.

Create a table that contains all the necessary information and parameters you are looking for. Give your table an appropriate name and add headings to the columns so that all the relevant information can be captured.

For example, let's create a spreadsheet called "Tracking Sheet" and assume that we need to track the following parameters:

  • The website that redirects traffic to your checkout page (this parameter shows 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 the customer paid for their order

  • The payment status

  • The date when the order was placed

What you need to do next is tell Zapier how and what exactly you want it to respond to.

In order for Zapier to know that it should "listen" to your product sales process, you need to create a webhook. In other words, you need to set up a mechanism to tell the system that something has happened.

To do this, go into your Zapier account and follow the next steps:

  1. Go to the Zaps menu

  2. Click on the Make a New Zap button

  3. Scroll down to Built-In Apps and select Webhooks by Zapier

  4. Select Catch Hook as trigger event and press Continue

What you just did is create a webhook endpoint. This is a unique address to which the specific messages are sent when an action takes place.

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

To do this, open your CopeCart home page in a new tab, click on your username in the upper right corner, go to IPN Connections, and create and name a new generic IPN integration.

Now you need to tell CopeCart to send notifications to the webhook endpoint you created in Zapier. Just copy the webhook URL from Zapier in the Notification URL field in CopeCart, set a password (identical for CopeCart and Zapier), and press Save Changes.

Go to the product edit page and enable an IPN integration with Zapier.

Then go over to the product checkout page, add the next line to the page URL and press Enter.

?metadata=test

Next, proceed with the trial purchase, fill in the fields with the desired user information, select a payment plan and the trial payment option, and click Order Now.

You have just completed a trial purchase.

Now switch to Zapier and proceed to the next step by clicking the Continue button. You will be redirected to the trial step. We strongly recommend that you continue with the test by clicking 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. Select Create Spreadsheet Row as the action event and click Continue.

  3. This means that each time the product is purchased, a new row will be created in a specific Google Spreadsheet with the appropriate parameters.

  4. Select the Google Account (your personal or business account where you have already created a spreadsheet as the very first step) and click Continue.

You need to configure what information should be displayed in the Google Spreadsheet. Select Google Drive, Table and Spreadsheet and proceed to configure the parameter display.

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

If you click the "Continue" button, you will be redirected to another test step. Continue with the test to see if everything works properly:

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

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

After you activate the Zap, each time the product is purchased, a corresponding record will appear in your spreadsheet (click on the image to see it full size):

If you want to integrate CopeCart and Google Sheets via Zapier for other products, enable the appropriate Zapier connection for each product on a product edit page.


For further questions, feel free to contact our support team at support-us@copecart.com

Best regards

Your CopeCart US Team

Did this answer your question?