← Guides·Adobe Analytics

Adobe Analytics

Adobe Analytics campaign tracking code: s.campaign guide

Set up campaign tracking in Adobe Analytics: build tracking codes, capture cid in s.campaign or the Web SDK, classify the codes and check every link.

Rafael CampoamorDigital Marketing Freelancer
8 min read · 1744 words

Campaign tracking in Adobe Analytics works through one value: the tracking code you put on every campaign link, usually as ?cid=, and copy into the campaign variable (s.campaign in AppMeasurement, marketing.trackingCode in the Web SDK). Adobe reports it in the Tracking Code dimension, and everything else (campaign names, channels, creatives) comes from classifying that code.

So the quality of your campaign reports depends on three things you control: how you build the codes, how your implementation captures them, and whether anyone notices when a link goes out without one. This guide covers the three, with the settings and code from Adobe’s Experience League.

How campaign tracking works in Adobe Analytics

Adobe’s own campaign tracking use case has four steps:

  1. Agree on a tracking code format. A consistent structure lets you group codes in reports and write classification rules later.
  2. Add the code to every link you control outside the site: ads, emails, social posts. It usually goes in the query string.
  3. Capture the code in your implementation. Your solution design reference says which variable holds it.
  4. Report on it in Analysis Workspace: drag the Tracking Code dimension onto a freeform table and add a metric such as Visits or Orders.

The parameter name is your decision. Adobe’s examples use cid (campaign ID), as in https://example.com?cid=EM989027. What matters is that every team uses the same one.

Under the hood, AppMeasurement sends each hit as an image request, the 1×1 "tracking pixel" people search for. The tracking code travels in that request as the v0 query parameter, which is the first thing to look for when you debug a campaign that reports nothing.

Build tracking codes you can classify

A tracking code is an ID, not a sentence. Keep the readable names (campaign, channel, market, creative) out of the URL and put them in classifications, where you can fix a typo once instead of in every link already sent.

A structure that classification rules can split cleanly:

PositionMeaningExample
1Channel prefixem (email), ps (paid search), so (social)
2Campaign ID2611
3Marketes
4Creative or variantb

Joined with a fixed separator, that gives em-2611-es-b. Three rules keep it usable:

Our post on campaign naming conventions goes deeper on the register and the review step.

Capture the code: s.campaign, tags or Web SDK

The campaign variable holds the tracking code. Earlier versions of Adobe Analytics gave it special behavior; in the current version Adobe says it "acts identical to an eVar". Values are limited to 255 bytes and longer ones are truncated.

How you set it depends on your implementation:

ImplementationWhere the code goesHow to read it from the URL
AppMeasurements.campaigns.campaign = s.Util.getQueryParam("cid");
Adobe Analytics extension (tags)Campaign section of a Set Variables action, or the extension’s global settingsSet Campaign to a query string parameter
Web SDK (XDM)xdm.marketing.trackingCodeA data element that reads the query string
Web SDK (data object)data.__adobe.analytics.campaignThe same data element

With AppMeasurement, a landing URL such as https://example.com?cid=em-2611-es-b and this line:

s.campaign = s.Util.getQueryParam("cid");

sends em-2611-es-b to the Tracking Code dimension.

If you need several parameters at once, Adobe’s getQueryParam plug-in reads a comma-separated list and joins the matches with a delimiter: on ?cid=trackingcode&ecid=123, getQueryParam('cid,ecid',':') returns trackingcode:123. Adobe Consulting provides the plug-in as a courtesy and Customer Care does not support it, so for a single parameter Adobe recommends the built-in options above.

Expiration and allocation

Because the variable behaves like an eVar, decide its persistence before launch, not after the first report looks odd. Adobe documents the persistence as configurable and uses 30 days from when the variable was set as its example. For eVars, the allocation options are Most Recent (Last), Original Value (First) and Linear, and the settings live in Admin › Report Suites › Edit Settings › Conversion › Conversion Variables. Adobe advises against switching an eVar to or from Linear once it has history; a new variable is safer.

What about UTM parameters?

Adobe Analytics does not read utm_source, utm_medium or utm_campaign on its own. If your links already carry them, because another team uses Google Analytics, Adobe’s use case gives two options:

OptionHow it worksTrade-off
ConcatenateSend all utm values to the Tracking Code dimension as one string, then split them with classification rulesUses no extra eVars, but the rules take more work
One eVar eachSend each utm parameter to its own eVarSimpler to build, uses more eVars

Whichever you pick, the naming rules from the previous section apply to the utm values too. Google’s campaign data collection guide explains how the same parameters work on the GA4 side, which helps when both tools must agree.

Classify codes into campaigns and channels

Classifications turn em-2611-es-b into a campaign name, a channel, a market and a creative, without changing the code. Adobe’s classification overview covers the model; the community thread on how to effectively use SAINT classifications shows how teams use them in practice.

Two ways to fill them:

Plan for the newer experience. Adobe lists the Classification Rule Builder as legacy, to be deprecated on 28 February 2027, and tells users to move to the rules in Classification sets once they are available. Test any rule set before turning it on: Adobe recommends Draft mode, where rules cannot run.

Tracking code vs marketing channels

Marketing Channels answer a different question: which bucket (paid search, email, social, direct) gets the credit for a visit. You enable them in the report suite and configure their processing rules, and a rule can use the tracking code to decide the channel.

The two will not always agree, and Adobe’s Tracking Code documentation says why:

Tracking CodeMarketing Channels
What it storesThe raw code from the linkThe channel a processing rule assigns
PrecedenceWhatever the implementation setsAn earlier rule can take precedence over a later one
CreditChanges only when a new code arrives or the old one expiresAnother channel can take last-touch credit
ExpirationFrom when the variable was setA rolling 30-day engagement period

When the two disagree, start with the rule order and the expiration, not the data. For the attribution side, see attribution models in Adobe Analytics.

Searches for "Adobe Analytics link tracking" often mean something else. Link tracking uses s.tl(), which sends an image request for a click on your own page without counting a page view. It has three link types: o (custom), d (download) and e (exit). In the Web SDK, the same call maps the link to xdm.web.webInteraction.name, .URL and .type.

Campaign tracking records which outside link brought the visit; link tracking records what the visitor clicked once on the site. Custom links have their own guide: advanced tracking in Adobe Analytics.

Adobe Campaign emails

If your emails go out through Adobe Campaign, its connector can set the tracking parameters for you. In Campaign v8 the integration maps two conversion variables, the internal campaign name (cid) and the broadlog ID (bid), plus ten email success events such as Sent, Opened and Clicked. The setup, and what flows in each direction, is in our guide to the Adobe Campaign and Adobe Analytics integration.

Most broken campaign reports come from links, not from Adobe: a missing cid, a code typed by hand, a redirect that drops the query string, an email tool that rewrites the URL.

Before launch:

  1. Open every final URL, as the ad platform or email tool will serve it, and confirm the parameter survives each redirect.
  2. In the browser’s network panel or Adobe’s debugger extension, find the hit and check v0 holds the exact code.
  3. Check the code exists in your register and matches the classification rules.

After launch, watch the Tracking Code report for codes that do not classify and for a channel whose visits drop to zero. Doing that by hand works for one campaign; it does not work for forty running at once. That is where Trackingplan helps: it discovers the campaigns and UTMs your traffic actually carries, and warns about naming convention violations, missing events and unexpected traffic drops as they appear, with the same monitoring it runs on 170+ analytics and ad providers.

FAQ

What is the campaign tracking code in Adobe Analytics?

It is the value you add to a campaign link, usually as a query string parameter such as cid, and copy into the campaign variable. Adobe Analytics reports it in the Tracking Code dimension. The value is limited to 255 bytes and behaves like an eVar.

How do I set up campaign tracking in Adobe Analytics?

Agree on a code format, add the code to every campaign link, capture the parameter in s.campaign (AppMeasurement), the Campaign field of the Adobe Analytics extension or marketing.trackingCode (Web SDK), then classify the codes and report on the Tracking Code dimension in Analysis Workspace.

Does Adobe Analytics read UTM parameters automatically?

No. Adobe Analytics only records the parameters your implementation captures. Adobe suggests two options for utm values: concatenate them into the Tracking Code dimension and split them with classification rules, or send each one to its own eVar.

What is the difference between a tracking code and a marketing channel?

The tracking code is the raw value from the link. A marketing channel is the bucket a processing rule assigns to the visit. A channel rule can use the tracking code, but credit can differ: an earlier rule can win, and expiration works differently for each.

No. Link tracking (s.tl) records clicks on your own pages as custom, download or exit links and does not count a page view. Campaign tracking records which outside link brought the visit, through the tracking code in the landing URL.

Rafael CampoamorDigital Marketing Freelancer

Digital Marketing Freelancer

Trackingplan

See everything. Miss nothing.

Your implementations audited around the clock with real-time, real-user data. Real-time alerts about errors or changes in your data, campaigns, pixels, privacy and consent. Let AI flag issues before they cost you.