diff --git a/assets/src/mobile-redirection.js b/assets/src/mobile-redirection.js index ba833e45e10..6a04c2fab21 100644 --- a/assets/src/mobile-redirection.js +++ b/assets/src/mobile-redirection.js @@ -70,6 +70,11 @@ // from ensuing. See . window.stop(); // Stop loading the page! This should cancel all loading resources. + // Pass along referrer so that amp-analytics can report the correct referrer. + if ( document.referrer ) { + amphtmlUrlObject.searchParams.set( 'amp_referrer', document.referrer ); + } + // Replace the current page with the AMP version. location.replace( amphtmlUrlObject.href ); }