Skip to content

Commit

Permalink
extracted rs_amp_id
Browse files Browse the repository at this point in the history
  • Loading branch information
parth-mahajan committed Jan 13, 2021
1 parent b1a3b1f commit 8d06d8a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion analytics.js
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,8 @@ class Analytics {
*/
setAnonymousId(anonymousId, rudderAmpLinkerParm) {
// if (!this.loaded) return;
const parsedAnonymousId = rudderAmpLinkerParm ? parseLinker(rudderAmpLinkerParm) : null;
const parsedAnonymousIdObj = rudderAmpLinkerParm ? parseLinker(rudderAmpLinkerParm) : null;
const parsedAnonymousId = parsedAnonymousIdObj ? parsedAnonymousIdObj.rs_amp_id : null;
this.anonymousId = anonymousId || parsedAnonymousId || generateUUID();
this.storage.setAnonymousId(this.anonymousId);
}
Expand Down

0 comments on commit 8d06d8a

Please sign in to comment.