gutenberg
3 weeks ago
account-static.js
11 months ago
account.js
11 months ago
amplitude.js
1 year ago
consent-mapping.js
1 year ago
cookiebot-admin-script.js
6 months ago
dashboard.js
1 year ago
jquery.tipTip.js
3 years ago
multiple-page.js
3 years ago
network-settings-page.js
5 months ago
ppg-page.js
4 months ago
prior-consent-settings.js
3 years ago
settings-page.js
5 months ago
support-page.js
1 year ago
amplitude.js
30 lines
| 1 | // Load Amplitude SDK |
| 2 | const script = document.createElement('script'); |
| 3 | script.src = 'https://cdn.eu.amplitude.com/script/3573fa11b8c5b4bcf577ec4c8e9d5cb6.js'; |
| 4 | script.async = true; |
| 5 | script.onload = function () { |
| 6 | window.amplitude.init('3573fa11b8c5b4bcf577ec4c8e9d5cb6', { |
| 7 | serverZone: 'EU', |
| 8 | fetchRemoteConfig: true, |
| 9 | defaultTracking: false |
| 10 | }); |
| 11 | }; |
| 12 | document.head.appendChild(script); |
| 13 | |
| 14 | // Global tracking function |
| 15 | window.trackAmplitudeEvent = function (eventName, additionalProperties = {}) { |
| 16 | try { |
| 17 | if (window.amplitude?.track) { |
| 18 | const properties = { |
| 19 | source: 'wordpress_plugin', |
| 20 | timestamp: new Date().toISOString(), |
| 21 | ...additionalProperties |
| 22 | }; |
| 23 | |
| 24 | window.amplitude.track(eventName, properties); |
| 25 | } else { |
| 26 | } |
| 27 | } catch (error) { |
| 28 | } |
| 29 | } |
| 30 |