New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@dapperlabs/react-analytics

Package Overview
Dependencies
Maintainers
6
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dapperlabs/react-analytics - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

13

dist/index.js

@@ -73,2 +73,4 @@ 'use strict';

* @param {String} SEGMENT_WRITE_TOKEN
*
* WARNING: Replacing this snippet will remove code that accommodates injection without existing script tag. See Line 81.
*/

@@ -121,5 +123,12 @@ function injectAnalyticsJs(SEGMENT_WRITE_TOKEN) {

script.src = 'https://cdn.segment.com/analytics.js/v1/' + key + '/analytics.min.js'; // Insert our script next to the first script element.
// In cases where there isn't a script element (ex: Dapper's Auth0 pages),
// insert the script next to the body instead.
var first = document.getElementsByTagName('script')[0];
first.parentNode.insertBefore(script, first);
var element = document.getElementsByTagName('script')[0];
if (!element) {
element = document.getElementsByTagName('body')[0];
}
element.parentNode.insertBefore(script, element);
analytics._loadOptions = options;

@@ -126,0 +135,0 @@ }; // Add a version to keep track of what's in the wild.

2

package.json
{
"name": "@dapperlabs/react-analytics",
"version": "0.1.0",
"version": "0.2.0",
"description": "A utility to connect react projects to segment",

@@ -5,0 +5,0 @@ "repository": "github:dapperlabs/react-analytics",

@@ -5,3 +5,6 @@ /**

* @param {String} SEGMENT_WRITE_TOKEN
*
* WARNING: Replacing this snippet will remove code that accommodates injection without existing script tag. See Line 81.
*/
export default function injectAnalyticsJs(SEGMENT_WRITE_TOKEN) {

@@ -76,4 +79,9 @@ // Create a queue, but don't obliterate an existing one!

// Insert our script next to the first script element.
var first = document.getElementsByTagName('script')[0];
first.parentNode.insertBefore(script, first);
// In cases where there isn't a script element (ex: Dapper's Auth0 pages),
// insert the script next to the body instead.
var element = document.getElementsByTagName('script')[0];
if (!element) {
element = document.getElementsByTagName('body')[0];
}
element.parentNode.insertBefore(script, element);
analytics._loadOptions = options;

@@ -80,0 +88,0 @@ };

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc