@amplitude/gtm-snippet 2.25.4 → 2.26.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/lib/amplitude-wrapper.js +2 -2
- package/lib/scripts/analytics-browser-gtm-wrapper.min.js +1 -1
- package/lib/scripts/analytics-browser-gtm-wrapper.min.js.gz +0 -0
- package/lib/scripts/analytics-browser-gtm-wrapper.min.js.map +1 -1
- package/package.json +4 -4
- package/scripts/upload-to-s3.js +5 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@amplitude/gtm-snippet",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.26.1",
|
|
4
4
|
"description": "Amplitude JS SDK Wrapper for use with Google Tag Manager",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"author": "Amplitude <support@amplitude.com>",
|
|
22
22
|
"license": "MIT",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@amplitude/analytics-browser": "^2.
|
|
25
|
-
"@amplitude/plugin-session-replay-browser": "^1.22.
|
|
24
|
+
"@amplitude/analytics-browser": "^2.26.1",
|
|
25
|
+
"@amplitude/plugin-session-replay-browser": "^1.22.23"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@amplitude/eslint-plugin-amplitude": "^1.0.1",
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"eslint-plugin-prettier": "^4.0.0",
|
|
36
36
|
"prettier": "^2.4.1"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "131c24c2f551a68b037157cca2f0b77857608f42"
|
|
39
39
|
}
|
package/scripts/upload-to-s3.js
CHANGED
|
@@ -3,12 +3,15 @@ const path = require('path');
|
|
|
3
3
|
const analyticsBrowserPkg = require(path.join(process.cwd(), '..', 'analytics-browser', 'package.json'));
|
|
4
4
|
const { S3Client, PutObjectCommand, HeadObjectCommand } = require('@aws-sdk/client-s3');
|
|
5
5
|
const bucket = process.env.S3_BUCKET_NAME;
|
|
6
|
-
|
|
6
|
+
|
|
7
|
+
const extension = 'min.js.gz';
|
|
8
|
+
const filename = 'analytics-browser-gtm-wrapper';
|
|
9
|
+
const gtmWrapper = `./lib/scripts/${filename}.${extension}`;
|
|
7
10
|
|
|
8
11
|
const getVersion = () => analyticsBrowserPkg.version;
|
|
9
12
|
let deployed = false;
|
|
10
13
|
const body = fs.readFileSync(path.join(process.cwd(), gtmWrapper));
|
|
11
|
-
const key = `libs
|
|
14
|
+
const key = `libs/${filename}-${getVersion()}.${extension}`;
|
|
12
15
|
|
|
13
16
|
if (process.env.DRY_RUN) {
|
|
14
17
|
console.log(`[Publish to AWS S3] Dry run. Skipping upload job.`);
|