Attribute Docs

Rule Engine & Templates

How sessions are classified into traffic types and how the Attribution Matrix rewrites brand links

The Cogwheel Attribute Rule Engine classifies each visitor session into a traffic type and dynamically rewrites links, inputs, and DOM attributes as the visitor browses your site.

How the Rule Engine Works

When a visitor lands on your vanity website, the Cogwheel script captures their attribution parameters (UTMs, referrer, click IDs) and stores them for the duration of their session (30 minutes of inactivity).

  1. The script classifies the session into exactly one traffic type — for example google_ads_session, meta_ads_session, bing_ads_session, or fallback_session (see the condition field reference below for the exact matching rules).
  2. When the visitor hovers over, clicks, or submits a form targeting a brand booking domain (e.g., marriott.com), the script checks your Attribution Matrix for a row whose Traffic Type matches the session and whose Target Domain matches the link.
  3. Each matching row applies its action: appending the brand parameter with your Campaign Value (e.g., cid=PMO_...), and injecting the same value into booking form fields.
Visitor SessionAd click, organic,direct, email, …Traffic ClassificationExactly one traffic typeper sessionAttribution MatrixGoogle Ads × Marriott → cid = PMO_…Facebook Ads × Marriott → cid = PMO_…Fallback × Marriott → cid = UNP_…Rewritten Booking Linkmarriott.com/book?cid=PMO_YOUR_SCIDchannel-specific value attached

Because the standard traffic types are mutually exclusive, a session matches at most one paid preset — so a typical setup of one row per traffic type per brand produces exactly one value per parameter.

Avoid creating duplicate rows for the same Traffic Type and Hotel Brand. When two matching rules write the same parameter, the rule evaluated later overwrites the earlier value.

Attribution Rules Configuration Matrix


Configuring the Attribution Matrix

The Rules tab shows the Attribution Matrix — one row per Traffic Type and Hotel Brand combination. You only supply the Campaign Value; everything else is derived from the preset you pick.

Option A: Pre-populate the standard matrix

Click Pre-populate Standard Hotel Matrix to create rows for the standard traffic types across the Marriott, Hilton, and Hyatt presets. Then click the pencil (edit) icon on each row you need, paste the campaign code into Campaign Value, and save. Delete the rows you do not need (trash icon).

Option B: Add rows manually

  1. Click Add Attribution Rule — a new editable row appears at the bottom of the matrix.
  2. Pick the Traffic Type (e.g., Google Ads).
  3. Pick the Hotel Brand (e.g., Marriott). The Target Domain and Param Name fill in automatically.
  4. Paste your campaign code into Campaign Value.
  5. Confirm the Status toggle is active, then save the row.

Repeat for each traffic type you track. A typical Marriott property has Google Ads, Facebook Ads, and Fallback rows.

Matrix columns

ColumnMeaning
Traffic TypeThe visitor channel the rule matches (Google Ads, Facebook Ads, Bing Ads, TikTok Ads, LinkedIn Ads, Twitter Ads, Reddit Ads, Fallback)
Hotel BrandThe brand preset whose booking domain the rule targets
Target DomainThe brand domain whose links get rewritten (auto-filled, e.g. marriott.com)
Param NameThe URL parameter Attribute appends (auto-filled, e.g. cid)
Campaign ValueYour campaign code — the only value you supply
StatusToggle the rule active or inactive. Inactive rules never match.

Brand Rule Templates

The traffic-type presets check for both platform click IDs and standard UTM tagging, so they match real-world traffic even when a click ID is missing.

  • Matches sessions with gclid, gad_source, gbraid, or wbraid — or utm_source=google-style tagging with a paid medium such as cpc.
  • Marriott action: appends cid with your Google Ads PMO_ code.

Meta Ads (Facebook & Instagram)

  • Matches sessions with fbclid, cft, or igshid — or utm_source=facebook / instagram / ig tagging with a paid medium.
  • Marriott action: appends cid with your Meta Ads PMO_ code.

Microsoft/Bing Ads

  • Matches sessions with msclkid — or utm_source=bing tagging with a paid medium.
  • Marriott action: appends cid with your Bing Ads PMO_ code.

Fallback (Unpaid / Catch-All)

  • Matches every session that no paid preset recognized — direct visits, organic search, referrals, email links, untagged social posts, and any mistagged campaigns.
  • Marriott action: appends cid with your unpaid UNP_ code.

Fallback is not just "organic and direct." It is the safety net for all unmatched traffic, which is why its Campaign Value should be your unpaid (UNP_) code: visitors who arrive without recognizable paid tags still carry a valid tracking code instead of none.


Custom Brands & Parameters

If you use a booking engine outside the built-in presets, choose Custom in the Hotel Brand column. This unlocks the Target Domain and Param Name fields so you can target any domain with any parameter — for example book.vanityresort.com with the parameter aff_id.


Reference: Condition Fields & Brand Mappings

Traffic Source Condition Fields

Each Traffic Type row maps to one of these session classifiers:

Condition FieldMatches Session When...
google_ads_sessionLanding URL contains gclid, gad_source, gbraid, wbraid, dclid, or utm_source matches google/google-ads/googleads/adwords + utm_medium matches cpc/ppc/paid/ads/ad/paidsearch.
meta_ads_sessionLanding URL contains fbclid, cft, igshid, or utm_source matches facebook/instagram/ig/messenger/meta/fb + utm_medium matches cpc/ppc/ads/paid/paid_social/paidsocial/paid-social/social-ads/social_ads.
bing_ads_sessionLanding URL contains msclkid or utm_source matches bing/bingads/bing-ads/microsoft/msn + utm_medium matches cpc/ppc/ads/paid/paidsearch/ad.
tiktok_ads_sessionLanding URL contains ttclid or utm_source containing tiktok / matching tt + utm_medium matches CPC/Paid/Paid Social.
linkedin_ads_sessionLanding URL contains li_fat_id or utm_source containing linkedin / matching lnkd + utm_medium matches CPC/Paid/Paid Social.
twitter_ads_sessionLanding URL contains twclid or utm_source containing twitter / matching x / t.co + utm_medium matches CPC/Paid/Paid Social.
reddit_ads_sessionLanding URL contains rdt_cid or utm_source containing reddit + utm_medium matches CPC/Paid/Paid Social.
unpaid_referrerLanding URL contains no paid click IDs, and the UTM medium does not indicate CPC or paid search/social.
fallback_sessionCatch-all for any session that does not match any paid search/social presets.

Hotel Brand Parameters

The application features native presets to map rules to specific booking domains. Outbound links targeting these domains automatically receive the associated parameter name:

  • Marriott: Targets marriott.com using parameter cid (typically carrying a Marriott campaign code — historically called an SCID, now issued as a CID in Growth OS).
  • Hilton: Targets hilton.com using parameter WT.mc_id.
  • Hyatt: Targets hyatt.com using parameter src (typically carrying a concatenated Hyatt source code).
  • IHG: Targets ihg.com using parameter cm_mmc.
  • Wyndham: Targets wyndhamhotels.com using parameter CID.
  • Choice: Targets choicehotels.com using parameter mc.

On this page