Skip to content

馃悰 Fix: Clickio amp-ad vendor: enhanced Page URL Handling for Cached AMP Pages - #40393

Merged
erwinmombay merged 1 commit into
ampproject:mainfrom
ClickioTech:clickio-amp-ad-vendor-update
Sep 19, 2025
Merged

erwinmombay merged 1 commit into
ampproject:mainfrom
ClickioTech:clickio-amp-ad-vendor-update

Conversation

@ClickioTech

Copy link
Copy Markdown
Contributor

Problem Description

On cached AMP pages, the Clickio ad unit was sending incorrect URLs. The issue occurred because the ad was using global.context.location.href which returns the cached URL instead of the original canonical URL.

Root Cause

  • AMP Cache serves pages through CDN URLs that don't represent the actual page URL
  • The previous implementation only used global.context.location.href which points to the cached URL

Changes Made

  1. Added fallback URL resolution: Now checks global.context.sourceUrl first, falling back to global.context.location.href if not available
  2. Improved context access: Added clickioGlobal.ampContext = global.context for better access to the global context

@ClickioTech
ClickioTech marked this pull request as ready for review September 18, 2025 14:40
@erwinmombay
erwinmombay merged commit af62e03 into ampproject:main Sep 19, 2025
52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants