Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hadron analytics adapter: fix cross-origin exception on init #8472

Merged
merged 2 commits into from
May 25, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion modules/hadronAnalyticsAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import adapterManager from '../src/adapterManager.js';
import * as utils from '../src/utils.js';
import CONSTANTS from '../src/constants.json';
import { getStorageManager } from '../src/storageManager.js';
import {getRefererInfo} from '../src/refererDetection.js';

/**
* hadronAnalyticsAdapter.js - Audigent Hadron Analytics Adapter
Expand Down Expand Up @@ -35,7 +36,10 @@ var pageView = {
timezoneOffset: new Date().getTimezoneOffset(),
language: window.navigator.language,
vendor: window.navigator.vendor,
pageUrl: window.top.location.href,
pageUrl: (() => {
const ri = getRefererInfo();
return ri.canonicalUrl || ri.referer;
})(),
screenWidth: x,
screenHeight: y
};
Expand Down