@mparticle/web-google-analytics-4-client-kit 1.0.0

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.
@@ -0,0 +1,10 @@
1
+ var SDKsettings = {
2
+ apiKey: 'testAPIKey'
3
+ /* fill in SDKsettings with any particular settings or options your sdk requires in order to
4
+ initialize, this may be apiKey, projectId, primaryCustomerType, etc. These are passed
5
+ into the src/initialization.js file as the
6
+ */
7
+ };
8
+
9
+ // Do not edit below:
10
+ module.exports = SDKsettings;
@@ -0,0 +1,32 @@
1
+ <html>
2
+ <head>
3
+ <meta charset="utf-8">
4
+ <title>Mocha Tests</title>
5
+ <link rel="stylesheet" href="../node_modules/mocha/mocha.css" />
6
+ </head>
7
+ <body>
8
+ <div id="mocha"></div>
9
+
10
+ <script src="../node_modules/mocha/mocha.js"></script>
11
+ <script src="../node_modules/should/should.js"></script>
12
+ <script src="./boilerplate/mockhttprequest.js"></script>
13
+ <script src="../node_modules/@mparticle/web-sdk/dist/mparticle.js"></script>
14
+
15
+
16
+ <script>
17
+ var self = mParticle;
18
+ mParticle.addForwarder = function (forwarder) {
19
+ self.forwarder = new forwarder.constructor();
20
+ };
21
+
22
+ </script>
23
+ <script src="../dist/GoogleAnalytics4EventForwarder-Kit.iife.js"></script>
24
+
25
+ <script>mocha.setup('bdd')</script>
26
+
27
+ <script src="./tests.js"></script>
28
+ <script>
29
+ mocha.run();
30
+ </script>
31
+ </body>
32
+ </html>
@@ -0,0 +1,12 @@
1
+ {
2
+ "clientKey": "123456",
3
+ "appId": "abcde",
4
+ "userIdField": "customerId",
5
+ // The event for this mapping is a Navigation Event named 'Mapped Event Name' and it is mapped to 'earn_virtual_currency'
6
+ "eventNameMapping": "[{&quot;jsmap&quot;:&quot;-2106354334&quot;,&quot;map&quot;:&quot;1740494660027578603&quot;,&quot;maptype&quot;:&quot;EventClass.Id&quot;,&quot;value&quot;:&quot;earn_virtual_currency&quot;}]",
7
+ // The attributeMapping below has the following mapping:
8
+ // mappedEventKey1 --> virtual_currency_name
9
+ // mappedEventKey2 --> value
10
+ // mappedEventKey2 --> virtual_currency_name
11
+ "attributeMapping": "[{&quot;jsmap&quot;:null,&quot;map&quot;:&quot;mappedEventKey1&quot;,&quot;maptype&quot;:&quot;EventAttributeClass.Name&quot;,&quot;value&quot;:&quot;virtual_currency_name&quot;},{&quot;jsmap&quot;:null,&quot;map&quot;:&quot;mappedEventKey2&quot;,&quot;maptype&quot;:&quot;EventAttributeClass.Name&quot;,&quot;value&quot;:&quot;value&quot;},{&quot;jsmap&quot;:null,&quot;map&quot;:&quot;appName&quot;,&quot;maptype&quot;:&quot;EventAttributeClass.Name&quot;,&quot;value&quot;:&quot;virtual_currency_name&quot;}]"
12
+ }