Skip to content

Commit

Permalink
Merge pull request #21 from stape-io/data-tag-update
Browse files Browse the repository at this point in the history
Data tag update path
  • Loading branch information
Bukashk0zzz authored Jun 20, 2024
2 parents 43d7c89 + 3edcba9 commit 4187da2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
2 changes: 2 additions & 0 deletions metadata.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
homepage: "https://stape.io/"
versions:
- sha: f0b3afdab0acd076e71cf57bef517aa1f715c827
changeNotes: Update load data tag sript URL.
- sha: 6e81ef3f3e63f5b975277b9e04a0c7fc752c8212
changeNotes: Add ad_user_data and ad_personalization for consent mode v2.
- sha: 319497e7f4bf22b386ee67bc633e1ec3490d30bb
Expand Down
6 changes: 3 additions & 3 deletions template.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ let requestType = determinateRequestType();
if (requestType === 'post') {
const dataScriptVersion = 'v8';
const dataTagScriptUrl =
typeof data.load_data_tag_script_url !== 'undefined'
? data.load_data_tag_script_url.replace(
typeof data.data_tag_load_script_url !== 'undefined'
? data.data_tag_load_script_url.replace(
'${data-script-version}',
dataScriptVersion
)
: 'https://cdn.stape.io/dtag/' + dataScriptVersion + '.js';
: 'https://stapecdn.com/dtag/' + dataScriptVersion + '.js';
injectScript(
dataTagScriptUrl,
sendPostRequest,
Expand Down
14 changes: 7 additions & 7 deletions template.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -530,10 +530,10 @@ ___TEMPLATE_PARAMETERS___
},
{
"type": "TEXT",
"name": "load_data_tag_script_url",
"name": "data_tag_load_script_url",
"displayName": "Data Tag Script URL",
"simpleValueType": true,
"help": "Url, where to load data tag script from, by default will be loaded from https://cdn.stape.io/dtag/${data-script-version}.js. This can be parameterized with ${data-script-version} in order to load the correct version for this tag.",
"help": "Url, where to load data tag script from, by default will be loaded from https://stapecdn.com/dtag/${data-script-version}.js. This can be parameterized with ${data-script-version} in order to load the correct version for this tag.",
"valueValidators": [
{
"type": "REGEX",
Expand All @@ -543,7 +543,7 @@ ___TEMPLATE_PARAMETERS___
}
],
"alwaysInSummary": false,
"defaultValue": "https://cdn.stape.io/dtag/v8.js"
"defaultValue": "https://stapecdn.com/dtag/v8.js"
},
{
"type": "CHECKBOX",
Expand Down Expand Up @@ -707,12 +707,12 @@ let requestType = determinateRequestType();
if (requestType === 'post') {
const dataScriptVersion = 'v8';
const dataTagScriptUrl =
typeof data.load_data_tag_script_url !== 'undefined'
? data.load_data_tag_script_url.replace(
typeof data.data_tag_load_script_url !== 'undefined'
? data.data_tag_load_script_url.replace(
'${data-script-version}',
dataScriptVersion
)
: 'https://cdn.stape.io/dtag/' + dataScriptVersion + '.js';
: 'https://stapecdn.com/dtag/' + dataScriptVersion + '.js';
injectScript(
dataTagScriptUrl,
sendPostRequest,
Expand Down Expand Up @@ -1466,7 +1466,7 @@ ___WEB_PERMISSIONS___
"listItem": [
{
"type": 1,
"string": "https://cdn.stape.io/dtag/*"
"string": "https://stapecdn.com/dtag/*"
}
]
}
Expand Down

0 comments on commit 4187da2

Please sign in to comment.