Skip to content

Commit

Permalink
fbclid and gclid examples: remove redundant init
Browse files Browse the repository at this point in the history
  • Loading branch information
liaz-af committed Aug 13, 2024
1 parent 1c73c93 commit a657563
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
7 changes: 1 addition & 6 deletions examples/facebook_clickid.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,19 +60,14 @@ <h3>To edit: make changes to the input URL in the address bar and reload the pag
var mediaSource = {keys: ["inmedia"], defaultValue: "my_media_default_source"};
// Facebook clickid passthrough to af_sub2 outgoing parameter
var afSub2 = {keys: ["fbclid"]};
// Facebook clickid passthrough to "fbclid" outgoing parameter
var fbclid_out = {paramKey: "fbclid", keys: ["fbclid"]};

//Function is embedded on the window object in a global parameter called window.AF_SMART_SCRIPT.
//Onelink URL is generated
var result = window.AF_SMART_SCRIPT.generateOneLinkURL({
oneLinkURL,
afParameters:{
mediaSource: mediaSource,
afSub2: afSub2,
afCustom: [
fbclid_out
]
afSub2: afSub2
}
})

Expand Down
7 changes: 1 addition & 6 deletions examples/google_clickid.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ <h3>To edit: make changes to the input URL in the address bar and reload the pag
// If a media source key is NOT FOUND on the link and NO default value is found, the script will return a null string
var mediaSource = {keys: ["inmedia"], defaultValue: "my_media_default_source"};
var googleClickIdKey = "af_sub4";
// Google clickid passthrough to "gclid" outgoing parameter
var gclid_out = {paramKey: "gclid", keys: ["gclid"]};

//Calling the function after embedding the code will be through a global parameter
//on the window object called window.AF_SMART_SCRIPT
Expand All @@ -70,10 +68,7 @@ <h3>To edit: make changes to the input URL in the address bar and reload the pag
oneLinkURL,
afParameters:{
mediaSource: mediaSource,
googleClickIdKey: googleClickIdKey,
afCustom: [
gclid_out
]
googleClickIdKey: googleClickIdKey
}
})

Expand Down

0 comments on commit a657563

Please sign in to comment.