# SamCart Integration

> Step-by-step guide to integrate SamCart with AnyTrack for automated conversion tracking. Sync purchases to Google Ads, Meta, TikTok with server-side tracking and improved ROAS.

## Overview

Transform your SamCart checkout experience with AnyTrack's powerful conversion tracking. Automatically sync every purchase, upsell, and customer interaction across Google Ads, [Facebook Ads (Meta Ads)](/docs/facebook-ads), TikTok, and other major advertising platforms.

**What you'll achieve:**

* Complete customer journey visibility from first click to final purchase
* Real-time conversion data sent directly to ad platforms via Conversion APIs
* Improved ROAS through better attribution and audience targeting
* Automatic tracking of upsells, order bumps, and checkout events

<Callout icon="💡" theme="default">
  ### **Integration Advantage**

  This integration replaces manual tag management with automated, server-side tracking that captures 100% of your conversion data—even when browsers block cookies or Tracking Tags fail to load.
</Callout>

## How It Works

When you connect SamCart to AnyTrack, every step of your customer's journey gets tracked and attributed to the right marketing channel

<SimpleStepper>
  <SimpleStep header="Step 1: Visitor land on your Samcart checkout page">
    AnyTrack captures traffic source data and assigns unique visitor IDs
  </SimpleStep>

  <SimpleStep header="Step 2: Visitor starts the checkout flow">
    AnyTrack automatically tracks each step of the checkout and sends each event to ad platforms via Conversion API
  </SimpleStep>

  <SimpleStep header="Step 3: Visitor completes the Purchase">
    Samcart Instantly sends the conversion data to AnyTrack
  </SimpleStep>

  <SimpleStep header="Step 4: AnyTrack sends conversion to Ad platforms Conversion API">
    Instantly sync conversion data to all connected ad platforms via Conversion API
  </SimpleStep>
</SimpleStepper>

The AnyTrack <Glossary>Conversion API</Glossary> approach ensures your ad platforms receive rich <Glossary>first-party data</Glossary> for better targeting, audience building, and campaign optimization.

<Prerequisites
  title="Before you begin"
  items={[
    { label: "You have an AnyTrack account with Personal Plan or higher", done: true },
    { label: "You have a SamCart account with any active plan", done: true },
    { label: "You have admin access to both platforms", done: true },
  ]}
/>

> ⚠ ****
>
> Some legacy SamCart plans don't include webhook integration. If webhooks aren't available, you can use our <a href='/docs/samcart-via-zapier'>Zapier integration method</a> instead.

## Integration Capabilities

<Cards columns={2}>

  <Card title="Customer Journey Tracking" icon="fa-route" aria-label="Track customer journey">
    Track every touchpoint from initial visit to final purchase, including cross-device attribution
  </Card>

  <Card title="Conversion API Sync" icon="fa-sync">
    Automatically send purchase data to Google Ads, Meta Conversion API, TikTok Events API, and other platforms via secure APIs
  </Card>

  <Card title="Complete Revenue Tracking" icon="fa-dollar-sign" aria-label="Revenue tracking">
    Capture all <code>revenue</code> including main purchases, upsells, and order bumps
  </Card>

  <Card title="Tag Management" icon="fa-code" aria-label="Tag Management">
    Centralized tag management.AnyTrack handles all your Tracking Tags automatically
  </Card>

</Cards>

## Setup Guide

<HTMLBlock html={"\n<iframe src=\"https://scribehow.com/embed/SamCart_Integration_Setup_Guide__vkdGfyNkSk6yJRKbpSy_qQ?skipIntro=true\" width=\"640\" height=\"551\" allow=\"fullscreen\" style=\"aspect-ratio: 1 / 1; border: 0; min-height: 480px\"></iframe>\n"} />

<br />

### Step 1: Configure AnyTrack Property

Start by setting up your tracking foundation:

1. **Create New Property** in your AnyTrack dashboard
2. **Copy Tracking Tag** from Property Settings > Tracking Script
3. **Note your Property ID** for reference

<Image align="center" border={true} caption="Copy your unique tracking tag from Property Settings" src={readmeAsset1} />

### Step 2: Install Tracking in SamCart

Configure SamCart to work with AnyTrack's tracking system:

1. Navigate to **SamCart Dashboard** > **Account Settings** > **Tracking & Pixels**

2. **Add Tracking Tag**: Paste your AnyTrack tag in **"Embed HTML/Scripts in Header"**

3. **Enable Pre-Redirect Tracking**: Turn on **"Fire Pixels Before Redirect"**

4. **Set URL Parameter**: Enter `atclid` in **"Content URL parameter"**

5. **Add Custom Parameter**: Click **"Add Parameter"** and enter `atclid`

6. **Save Changes**

### Step 3: Create Hidden Custom Field

This step ensures customer data flows correctly to AnyTrack:

1. Go to **Custom Fields** > **New Custom Field**
2. Set both **Name** and **Label** to `atclid`
3. Select **Hidden** as the field type
4. **Save** the custom field

<Image align="center" border={true} src={readmeAsset2} className="border" />

### Step 4: Connect the Integration

Link your SamCart account with AnyTrack:

1. **Install Integration**: Go to AnyTrack's [Integration Catalog](https://dashboard.anytrack.io/affiliate-networks)
2. **Find SamCart** and click install
3. **Copy Webhook URL** provided by the integration

<Image align="center" border={true} src={readmeAsset3} className="border" />

### Step 5: Set Up Webhooks

Configure SamCart to send purchase data to AnyTrack:

1. **Install Webhooks App**: Search for "Webhooks" in SamCart's App Marketplace
2. **Enter Webhook URL**: Paste the URL from Step 4
3. **Create Webhook Rule** with these settings:
   * Rule Type: **Global Rule**
   * Action: **Send Notify URL for POST for Orders**
   * Trigger: **Order Completed**

<Image align="center" border={true} src={readmeAsset4} className="border" />

### Step 6: Test Your Setup

Verify everything works correctly:

1. **Enable Test Mode** in SamCart
2. **Complete Test Purchase** using a test product
3. **Check Events Log** in your AnyTrack integration dashboard
4. **Verify Data Flow** - ensure purchase events appear within minutes

## Advanced Configuration

### Slide Checkout Setup

If you use SamCart's embedded Slide Checkout:

> 🚧 **Required**
>
> Enable Slide Checkout tracking in AnyTrack:
>
> 1. Go to **Property Settings** > **Client Side Tracking** > **SamCart Tab**
> 2. Toggle on **"Slider Checkout"** option

### Multi-Page Funnels

For funnels that include external landing pages:

<Callout icon="📍" theme="default">
  ### **Important**

  Add the AnyTrack tag to ALL pages in your funnel, not just SamCart pages. This ensures complete journey tracking and accurate attribution.
</Callout>

### Legacy Account Settings

If you connected SamCart before May 1st, 2025:

> ⚠ ****
>
> Disable client-side tracking in **Property Settings** > **Client Side Tracking** > **SamCart Settings** to avoid conflicts with the new integration.

## Technical Reference

### Tracked Events

| Event              | Description                        | Source  | Timing      |
| ------------------ | ---------------------------------- | ------- | ----------- |
| `PageView`         | Page visits across funnel          | JS Tag  | Real-time   |
| `OutboundClick`    | Clicks to checkout pages           | JS Tag  | Real-time   |
| `InitiateCheckout` | Checkout process starts            | JS Tag  | Real-time   |
| `AddPaymentInfo`   | Payment details entered            | JS Tag  | Real-time   |
| `Purchase`         | Order completed (includes upsells) | Webhook | Server-side |

### Integration Parameters

| Parameter       | Value     | Purpose                                       |
| --------------- | --------- | --------------------------------------------- |
| Tracking Group  | `samcart` | For passing click IDs to SamCart links        |
| Subid Parameter | `atclid`  | Automatic click ID collection and attribution |
| Webhook Format  | JSON POST | Server-side purchase data transmission        |

## Connect Your Ad Accounts

Once tracking is active, connect your advertising platforms:

<Cards columns={3}>

  <Card title="Google Ads" href='/docs/google-ads' icon="fa-brands fa-google" aria-label="Google Ads integration">
    Enhanced conversions and smart bidding optimization
  </Card>

  <Card title="Meta Ads" href='/docs/facebook-ads' icon="fa-brands fa-facebook" aria-label="Meta Ads integration">
    Conversion API for iOS 14.5+ attribution
  </Card>

  <Card title="TikTok Ads" href='/docs/tiktok-ads' icon="tiktok" aria-label="TikTok Ads integration">
    Events API for improved targeting
  </Card>

</Cards>

> ⚠ ****
>
> After connecting ad accounts through AnyTrack, remove existing Tracking Tags from SamCart to prevent duplicate tracking and attribution conflicts.

## Troubleshooting

### Events not appearing in AnyTrack

**Check these common issues:**

1. Verify the tracking tag is installed in SamCart's header section
2. Confirm the `atclid` custom field is created and set to Hidden
3. Test that webhooks are properly configured with the correct URL
4. Ensure test mode is enabled for initial testing

**Still having issues?** Check the browser console for JavaScript errors or contact support with your Property ID.

### Purchase values are incorrect

**Potential causes:**

1. Currency mismatch between SamCart and AnyTrack
2. Tax or shipping handling differences
3. Upsells not being included in total value

**To resolve:** Check your SamCart webhook payload in the integration logs and verify all products and fees are included.

### Attribution data missing for some conversions

**This typically happens when:**

1. Customers use different devices or browsers
2. Long consideration periods exceed cookie lifespans
3. Customers disable JavaScript or use ad blockers

**AnyTrack's server-side tracking minimizes these issues**, but some attribution gaps are normal in privacy-focused browsing environments.

<FaqAccordion
  title="SamCart Integartion - Frequently Asked Questions"
  icon="fa-duotone fa-circle-question"
  items={[
    {
      question: "What does the AnyTrack integration for SamCart do?",
      answer: "The integration automatically tracks customer journeys from first website visit through purchase completion. It captures checkout events, processes attribution data, and sends conversion information to your connected advertising platforms via secure Conversion APIs."
    },
    {
      question: "Do I need to install tracking code on every page?",
      answer: "Install the AnyTrack tag once in your SamCart account settings.it automatically applies to all checkout pages and products. However, if your funnel includes external landing pages, add the tag to those pages too for complete journey tracking."
    },
    {
      question: "How does this affect my existing Facebook and Google Ads tracking?",
      answer: "AnyTrack replaces your existing tag-based tracking with more accurate server-side Conversion APIs. You should remove existing Tracking Tags from SamCart to avoid duplicate data and conflicting attribution."
    },
    {
      question: "Will this track upsells and order bumps separately?",
      answer: "Yes, AnyTrack captures all <code>revenue</code> from the complete order, including main products, upsells, and order bumps as a single purchase event with the total value."
    },
    {
      question: "How quickly do conversions appear in my ad platforms?",
      answer: "Conversion data typically appears in connected ad platforms within 5-15 minutes of purchase completion, though some platforms may take up to an hour for full attribution processing."
    },
    {
      question: "Can I use this with other analytics tools?",
      answer: "Yes! AnyTrack complements tools like Google Analytics, providing enhanced attribution data while your existing analytics continue tracking website behavior and performance metrics."
    }
  ]}
/>

- [Advertising Integrations](/docs/advertising-integrations)
- [MediaGo Integration](/docs/mediago-ads-integration)
- [Outbrain Integration Checklist](/docs/outbrain-integration-verification-checklist)

## Next Steps

<Cards columns={2}>

  <Card title="Connect Ad Platforms" href='/docs/integrations' icon="plug" aria-label="Connect advertising platforms">
    Set up Google Ads, Meta, TikTok, and other advertising integrations
  </Card>

  <Card title="View Conversion Reports" href='/docs/conversions-report' icon="fa-chart-bar" aria-label="View conversion reports">
    Monitor your SamCart conversions and attribution data in real time
  </Card>

</Cards>

**Ready to optimize your campaigns?** With SamCart tracking active, you can now build powerful retargeting audiences, optimize for higher-value customers, and improve your return on ad spend across all connected platforms.
