Knowledge Base      


How do I track my SamCart sales in ClickMagick?


Here’s how to set up tracking with SamCart …


Step 1 – Add the Click Tracking Code to your Landing Page

If you haven’t already, install your Click Tracking Code on any landing page(s) you’re currently sending traffic to.

In ClickMagick, head over to Campaigns > Tools > Website Code Tool and choose “Website Code Wizard”. Copy the code shown in the first step.

  
 
 
Next, add this code to the head section of your landing page(s).

If you aren’t sure how to do that, just search the name of your page builder in our Knowledge Base.


Step 2 – Add the Tracking Parameter to your Checkout Links

If you’re linking from your own domain to a .samcart.com domain, you’ll need to add a tracking parameter to the checkout links on your sales page. You don’t need to do this if you’re using the same root domain throughout your funnel.

Just add ?cmc_vid=[cmc_vid] to the checkout links on your sales page. For example, if your checkout link is:

https://clickmagicktest.samcart.com/products/your-product

You’ll change the links on your sales page to be:

https://clickmagicktest.samcart.com/products/your-product?cmc_vid=[cmc_vid]


Step 3 – Add your Checkout Tracking Code

If you haven’t already, you’ll need to add the following code to your checkout page in SamCart.

Copy the code below:

<script>
    window.clickmagick_cmc = {
        uid: '[USERID]',
        hid: '[HID]',
        cmc_goal: 'e',
        cmc_ref: 'checkout',
        vid_info: 'on',
    }
</script>
<script src='//cdn.clkmc.com/cmc.js'></script>


In SamCart, click “Settings” in the bottom left corner.

 
 

Select “Tracking & Pixels”.
 
 
 

Paste the code into the “Embed HTML/Scripts in Header” section, then click on “Save Changes”.

 
 

This will track people who reach your checkout page as an Engagement in ClickMagick. It also collects their email address and other personal information to add to their Visitor Profile.


Step 4 – Set up the SamCart Integration for Sales Tracking

 
Note: This uses the “Webhooks” app in SamCart, which by default is only available on their “Scale” plan. If you’re on a lower plan, get in touch with SamCart support and let them know you’re a ClickMagick user that needs to enable webhooks. They will enable the “Webhooks” app for you, and you can continue with the set up.


In the main dashboard of SamCart, go to “Apps”, search for “webhooks” and install the “Webhooks” app.

  
   

Paste in the following Notify URL and hit “Connect”:

https://www.clickmagick.com/user/account/integrations/samcart/?uid=[USERID]

 
  

Click on “Webhooks” to access the settings for it.

 
 
 
Click on “+ Add New Rule”.

 
 

Select “Global Rule”, set the Action to “Send Notify Url POST”, select “Product Purchased” as the Trigger, then click on “Add Rule” to add it.

 
 

Add another rule with the same settings as before, but this time we’ll set the Trigger to “Product Refunded”.

 
 

Add another rule with the same settings as before, but this time we’ll set the Trigger to “Subscription Charged”.

 
 

Add one more rule with the same settings as before, but this time we’ll set the Trigger to “Subscription Charge Refunded”.

 
 

Once you’ve added all four rules, that’s it! SamCart will now send all your sales, refunds and recurring subscriptions directly to ClickMagick.


Step 4 – Remove your existing Sales Tracking Code

Once you’ve set up the integration, the final step is to remove any existing sales tracking code from your web pages that you may have added prior to December 2024.

The new integration will automatically track all of your sales, upsells and downsells, and refunds without the need for any sales tracking code on your pages ...

And if you have sales tracking code on your pages and use the integration at the same time things will break.

 
Note: We always process conversion data immediately, but please note there can be a delay between when a conversion occurs and when SamCart sends it to ClickMagick. It’s usually just a few minutes, but we have no control over it.


Article 952 Last updated: 12/14/2024 9:26:55 PM
https://www.clickmagick.com/kb/?article=952