Skip to content

Franchise/location-based campaign attribution via custom object

One of 565 written HubSpot workflow specs, by a collective of independent HubSpot consultants.

Enterprise

Seat pricing: Enterprise edition. To build it, a GTM Seat or an Ops Seat (an Ops Seat cannot create marketing emails or sequences). Per-hub plans: Marketing Hub Enterprise.

Custom5 stepsUpdated for HubSpot seat pricing
OutcomeA franchise or multi-location brand can see which physical location's campaign actually drove a given contact, instead of every lead looking like it came from one shared brand campaign.
Workflow mapmarketing-ops-038
latest_location_touch changes leads to Custom code: match Location record, confirm association. Custom code: match Location record, confirm association leads to result_code ok?. result_code ok? leads to Yes: Set attributed_location; No: Notify marketing ops of attribution failure. Set attributed_location leads to Set location_campaign_source. Yes No latest_location_touch changes Custom code: match Location record, confirm association result_code ok? Set attributed_location Notify marketing ops of attribution failure Set location_campaign_source
latest_location_touch changes leads to Custom code: match Location record, confirm association. Custom code: match Location record, confirm association leads to result_code ok?. result_code ok? leads to Yes: Set attributed_location; No: Notify marketing ops of attribution failure. Set attributed_location leads to Set location_campaign_source. Yes No latest_location_touch changes Custom code: match Location record, confirm association result_code ok? Set attributed_location Set location_campaign_source Notify marketing ops of attribution failure

When to use it, when not to

Use it

  • Use on a portal that already models locations as a custom object, a common franchise or multi-location pattern, where each location runs its own local campaigns (local paid social, local landing pages, in-store QR codes).
  • Use when corporate marketing needs to report ROI by location, not only by campaign name.
Read more on when to use itShow less

Skip it

  • Do not use if all campaigns are run centrally with no location-specific variant. Marketing Hub Enterprise's native Campaigns tool and marketing-ops-027's deal rollup already answer overall campaign ROI without a custom object.
  • Do not build the Location custom object from scratch as part of this fiche if your portal doesn't already model locations that way. That is a larger data-model project, out of scope here.
Read more on when to skip itShow less

The rest of this spec

Prerequisites · 5 items

Every property with its label, internal name, type and options, plus the assets the workflow needs.

Enrollment · 4 parts

The trigger, the criteria as ticked in the UI, the re-enrollment rule and the suppression list.

Steps · 5 numbered actions

Each action in order with its parameters, branches and delays.

Known pitfalls · 4

Traps seen in production, each with what breaks and what to do instead.

Test plan and UAT script · 4 cases, 3 variants

How to prove it works in a test portal, one case per branch, and a sign-off sheet.

Files · PDF, Markdown, JSON, CSV, code

The properties JSON creates the fields in one call. The workflow JSON documents the build. The custom coded action ships as a ready-to-paste .js file.

Install · 1 click, switched off

The installer creates the properties and the workflow, switched off, then opens a task for what it cannot create. Nothing is deleted, enabled or enrolled.

Unlock all 565 specs, 149 EUR

One-time, excl. VAT. 30-day refund. Installs in 3 portals. Founding price until 30 November.

Read the free Marketing ops spec

Read 12 complete specs before you pay.

One per category, same format as the paid ones. Email only, no card.

We email the link, then a short note when specs change. Nothing else.

149 EUR199

Full library, 565 specs
Get the full library