> This page is for version v2 (default).
> For other versions, use one of these documentation indexes:
> - v2 (default): https://developers-beta.clearpay.co.uk/v-2/llms.txt
> - v1: https://developers-beta.clearpay.co.uk/v-1/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers-beta.clearpay.co.uk/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers-beta.clearpay.co.uk/_mcp/server.

# Google Analytics

## Why Is Google Analytics incorrectly attributing the referrer to Clearpay?

When customers pay with Clearpay, they are redirected to **portal.clearpay.co.uk** pages during the checkout flow, before returning to your review or confirmation page. This results in Google Analytics seeing **portal.clearpay.co.uk** as the last domain visited. Therefore, it attributes the referral to `portal.clearpay.co.uk`

## The Solution - Referral Exclusion List

Add portal.clearpay.co.uk to your referral exclusion list to ensure Google correctly identifies the real referral source for traffic coming to your site.

> **Don't Exclude Afterpay Shop Traffic**
>
> Use `portal.clearpay.co.uk` NOT `clearpay.co.uk` or you will hide all traffic that comes from the Clearpay Shop Directory.