> For the complete documentation index, see [llms.txt](https://help.littledata.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.littledata.io/integrations/attentive/attribution-report-ga4-attentive.md).

# Track Attentive SMS campaigns in Google Analytics

## Track Attentive SMS campaigns in GA4

This page shows you how to tag Attentive SMS links with UTM parameters and where to find Attentive campaigns in GA4. It also explains why GA4 and Attentive report different numbers.

{% hint style="info" %}
This article is about tracking Attentive campaigns in Google Analytics 4 (GA4). For sending Shopify data to Attentive, see [How it works: Shopify to Attentive](https://help.littledata.io/integrations/attentive/how-it-works-shopify-to-attentive).
{% endhint %}

With Littledata's GA4 destination, you can:

* **See which SMS campaigns drive sales.** Compare Attentive with your other channels in one place.
* **Build better audiences.** Littledata sends browsing, checkout and purchase events (including refunds and repeat purchases) to GA4, so you can build audiences for Google Ads and other platforms.
* **Track subscription orders.** Littledata works with many [subscription apps](https://help.littledata.io/sources/shopify/tracking-subscription-orders-in-the-shopify-checkout), so recurring orders show up in GA4 too.

### How campaign tracking works

Attentive campaigns are tracked through Littledata's [Shopify to GA4](https://help.littledata.io/integrations/shopify-to-google-analytics/how-it-works-shopify-to-ga4) connection. You don't need Google Tag Manager.

GA4 reads the source of each session from the UTM parameters on the link the customer clicked. If your Attentive links don't have UTMs, GA4 can't tell those visits came from Attentive. That's why it's important to set them up correctly.

### Set up UTMs for Attentive SMS campaigns

Add UTMs to every link in your Attentive messages. When you create a message, Attentive's link shortener adds a default `utm_source` and `utm_medium`. You can change these defaults in Attentive under **Settings** > **Google Analytics**.

Whatever naming you choose, keep it consistent. Many merchants keep a shared spreadsheet of UTM names and check it regularly.

Attentive recommends this naming schema:

| UTM variable       | UTM value                                                |
| ------------------ | -------------------------------------------------------- |
| Source             | The name of the software platform sending SMS            |
| Medium             | sms                                                      |
| Campaign           | The name of the campaign or flow within the SMS platform |
| Content (optional) | The hook or offer of the SMS sent                        |
| Term (optional)    | The segment of your audience                             |

To add a tagged link to a campaign:

{% stepper %}
{% step %}

### Open the campaign design

In Attentive, create a campaign and go to the **Design your campaign** screen.
{% endstep %}

{% step %}

### Add a link

When you're ready to insert your link, click **+** (**Add link/media**)

<figure><img src="https://3956158252-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1QhTbrMraNWciQeDvu1b%2Fuploads%2FTLUplHjDBMpBwq15sPy1%2F41451.avif?alt=media&amp;token=58fe3726-2210-4ca8-bf4d-0372b211f58d" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Choose a short link

In the popup, click **Select** next to **Short link**.

<figure><img src="https://3956158252-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1QhTbrMraNWciQeDvu1b%2Fuploads%2FR8pR3Gppwxa15C5hoJjb%2F22222.avif?alt=media&amp;token=7c6687a1-c7aa-4364-a933-b779a7544e26" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Enter the URL with UTMs

Add the URL with your UTMs. You can type it in or use [Google's Campaign URL Builder](https://ga-dev-tools.web.app/campaign-url-builder). For example:

| Parameter   | Value     |
| ----------- | --------- |
| utm\_source | attentive |
| utm\_medium | sms       |

{% hint style="info" %}
You can set campaign defaults in Attentive's settings under **GA Link Tracking**. Attentive then fills in the URL parameters for you.
{% endhint %}
{% endstep %}

{% step %}

### Insert and send

Click **Shorten & insert URL**, review your campaign and send it.
{% endstep %}
{% endstepper %}

### Report on Attentive campaigns in GA4

Once your links have UTMs, Attentive flows and campaigns show up in GA4. You can look at Attentive on its own or compare it with your other channels.

Here's a real example where Attentive ranks first for revenue per session and session conversion rate:

![](https://3956158252-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1QhTbrMraNWciQeDvu1b%2Fuploads%2Fgit-blob-865d2cf08742703f590cca566165192d398e3993%2Fattentive-cvr-and-rps.png?alt=media)

{% hint style="success" %}
To build metrics like these, see [GA4 calculated metrics for ecommerce](https://help.littledata.io/google-analytics/behavior/ga4-calculated-metrics-that-improve-understanding-of-ecommerce-performance).
{% endhint %}

To see revenue and orders by Attentive campaign:

{% stepper %}
{% step %}

### Open the traffic acquisition report

In GA4, go to **Reports** > **Acquisition** > **Traffic acquisition**.
{% endstep %}

{% step %}

### Filter to Attentive

Change the primary dimension to **Session source** and search for `attentive` (or the source name you use).
{% endstep %}

{% step %}

### Add the campaign

Click **+** next to the dimension column and add **Session campaign** as a secondary dimension.
{% endstep %}
{% endstepper %}

### Will GA4 match Attentive?

No. GA4 tracks sessions and attributes sales differently from Attentive. The main differences are:

* **Quick visits may not count in GA4.** If Attentive logs a visit and GA4 doesn't, the browser probably didn't stay on the page long enough for GA4 to record a session.
* **Cross-device journeys.** GA4 only links visits on different devices when it can identify the same user, for example a logged-in customer. If someone clicks an SMS on their phone and buys later on their laptop, GA4 may credit a different source.
* **Different attribution rules.** GA4's traffic acquisition report credits each session to its own source. Attentive uses its own attribution window, which can credit a purchase to an SMS click (or view) from days earlier.

If you want Attentive's attributed revenue to match GA4 more closely, ask Attentive to change your attribution window to a zero-day click window and to exclude view-through purchases.

### Related articles

* [How it works: Shopify to Attentive](https://help.littledata.io/integrations/attentive/how-it-works-shopify-to-attentive)
* [How it works: Shopify to GA4](https://help.littledata.io/integrations/shopify-to-google-analytics/how-it-works-shopify-to-ga4)
* [Troubleshooting marketing attribution for Shopify](https://help.littledata.io/advanced/troubleshooting/troubleshooting-marketing-attribution-for-shopify)
