Socket
Socket
Sign inDemoInstall

ember-cli-google-analytics

Package Overview
Dependencies
1
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0 to 1.1.0

4

CHANGELOG.md
# ember-cli-google-analytics Changelog
### 1.1.0
Adds support for cookie-related settings: `cookieDomain`, `cookieName`, and `cookieExpires`. This applies to analytics.js only.
### 1.0.0
Initial release of the ember-cli-google-analytics addon

@@ -7,6 +7,26 @@ 'use strict';

tracker: 'analytics.js',
webPropertyId: null
webPropertyId: null,
cookieDomain: null,
cookieName: null,
cookieExpires: null
};
function analyticsTrackingCode(config) {
var gaConfig = {};
if (config.cookieDomain != null) {
gaConfig.cookieDomain = config.cookieDomain;
}
if (config.cookieName != null) {
gaConfig.cookieName = config.cookieName;
}
if (config.cookieExpires != null) {
gaConfig.cookieExpires = config.cookieExpires;
}
if (Object.keys(gaConfig).length === 0) {
gaConfig = "'auto'";
} else {
gaConfig = JSON.stringify(gaConfig);
}
return [

@@ -19,3 +39,3 @@ "<script>",

"",
"" + config.globalVariable + "('create', '" + config.webPropertyId + "', 'auto');",
"" + config.globalVariable + "('create', '" + config.webPropertyId + "', " + gaConfig + ");",
"" + config.globalVariable + "('send', 'pageview');",

@@ -22,0 +42,0 @@ "</script>"

2

package.json
{
"name": "ember-cli-google-analytics",
"version": "1.0.0",
"version": "1.1.0",
"scripts": {

@@ -5,0 +5,0 @@ "test": "echo \"Error: no test specified\" && exit 1"

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc