Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@analytics/crazy-egg

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@analytics/crazy-egg - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

8

CHANGELOG.md

@@ -6,2 +6,10 @@ # Change Log

## [0.1.1](https://github.com/DavidWells/analytics/compare/@analytics/crazy-egg@0.1.0...@analytics/crazy-egg@0.1.1) (2019-10-14)
**Note:** Version bump only for package @analytics/crazy-egg
# 0.1.0 (2019-10-07)

@@ -8,0 +16,0 @@

5

dist/@analytics/crazy-egg.js

@@ -8,3 +8,3 @@ var analyticsCrazyEgg = (function () {

* Crazy egg plugin
* @link https://getanalytics.io/plugins/crazyegg/
* @link https://getanalytics.io/plugins/crazyegg
* @link https://help.crazyegg.com/article/43-crazy-egg-manual-installation

@@ -16,2 +16,3 @@ * @param {object} pluginConfig - Plugin settings

*
* // This will load crazy egg on to the page
* crazyEgg({

@@ -31,3 +32,3 @@ * accountNumber: '1234578'

if (!accountNumber) {
throw new Error('No crazy egg accoint defined');
throw new Error('No crazy egg accountNumber defined');
}

@@ -34,0 +35,0 @@

2

dist/@analytics/crazy-egg.min.js

@@ -1,1 +0,1 @@

var analyticsCrazyEgg=function(){"use strict";return function(){return{NAMESPACE:"crazy-egg",config:0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},initialize:function(t){var e=t.config.accountNumber;if(!e)throw new Error("No crazy egg accoint defined");var c=document.location,n="https:"===c.protocol||"chrome-extension:"===c.protocol,o="".concat(e.slice(0,4),"/").concat(e.slice(4)),r=Math.floor((new Date).getTime()/36e5),a="".concat(n?"https:":"http:","//script.crazyegg.com/pages/scripts/").concat(o,".js?").concat(r),i=document.createElement("script");i.type="text/javascript",i.async=!0,i.src=a,setTimeout(function(){var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(i,t)},0)},loaded:function(){return!!window.CE2}}}}();
var analyticsCrazyEgg=function(){"use strict";return function(){return{NAMESPACE:"crazy-egg",config:0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},initialize:function(t){var e=t.config.accountNumber;if(!e)throw new Error("No crazy egg accountNumber defined");var c=document.location,n="https:"===c.protocol||"chrome-extension:"===c.protocol,o="".concat(e.slice(0,4),"/").concat(e.slice(4)),r=Math.floor((new Date).getTime()/36e5),a="".concat(n?"https:":"http:","//script.crazyegg.com/pages/scripts/").concat(o,".js?").concat(r),i=document.createElement("script");i.type="text/javascript",i.async=!0,i.src=a,setTimeout(function(){var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(i,t)},0)},loaded:function(){return!!window.CE2}}}}();

@@ -7,3 +7,3 @@ 'use strict';

* Crazy egg plugin
* @link https://getanalytics.io/plugins/crazyegg/
* @link https://getanalytics.io/plugins/crazyegg
* @link https://help.crazyegg.com/article/43-crazy-egg-manual-installation

@@ -15,2 +15,3 @@ * @param {object} pluginConfig - Plugin settings

*
* // This will load crazy egg on to the page
* crazyEgg({

@@ -30,3 +31,3 @@ * accountNumber: '1234578'

if (!accountNumber) {
throw new Error('No crazy egg accoint defined');
throw new Error('No crazy egg accountNumber defined');
}

@@ -33,0 +34,0 @@

@@ -5,3 +5,3 @@ /* global CE2 */

* Crazy egg plugin
* @link https://getanalytics.io/plugins/crazyegg/
* @link https://getanalytics.io/plugins/crazyegg
* @link https://help.crazyegg.com/article/43-crazy-egg-manual-installation

@@ -13,2 +13,3 @@ * @param {object} pluginConfig - Plugin settings

*
* // This will load crazy egg on to the page
* crazyEgg({

@@ -28,3 +29,3 @@ * accountNumber: '1234578'

if (!accountNumber) {
throw new Error('No crazy egg accoint defined');
throw new Error('No crazy egg accountNumber defined');
}

@@ -31,0 +32,0 @@

{
"name": "@analytics/crazy-egg",
"version": "0.1.0",
"version": "0.1.1",
"description": "Crazy Egg integration for 'analytics' module",
"projectMeta": {
"provider": {
"name": "Crazy Egg",
"url": "https://www.crazyegg.com/"
},
"platforms": {
"browser": "./src/browser.js"
}
},
"keywords": [

@@ -44,3 +53,3 @@ "analytics",

},
"gitHead": "82f570b0bdc5e5eb0e914a2f230a85b3f3e86cb9"
"gitHead": "159c0f42b5af886af963a0a65e1f5c3c33f023f2"
}

@@ -0,1 +1,5 @@

<!--
title: CrazyEgg
description: Using the CrazyEgg plugin
-->
# Crazy Egg Plugin for `analytics`

@@ -5,6 +9,27 @@

For more information [see the docs](https://getanalytics.io/plugins/crazyegg/).
Crazy egg adds heat mapping, A/B testing, and session recording functionality to websites and applications. This allows developers, marketers, and product owners to see what is working and what areas of an application might need improvements.
## Install
This analytics plugin will load crazy egg into your application.
[View the docs](https://getanalytics.io/plugins/crazyegg/).
<!-- AUTO-GENERATED-CONTENT:START (TOC:collapse=true&collapseText=Click to expand) -->
<details>
<summary>Click to expand</summary>
- [Installation](#installation)
- [How to use](#how-to-use)
- [Browser usage](#browser-usage)
* [Browser API](#browser-api)
- [Platforms Supported](#platforms-supported)
- [Additional examples](#additional-examples)
- [Usage](#usage)
</details>
<!-- AUTO-GENERATED-CONTENT:END -->
## Installation
Install `analytics` and `@analytics/crazy-egg` packages
```bash

@@ -15,2 +40,138 @@ npm install analytics

<!-- AUTO-GENERATED-CONTENT:START (PLUGIN_DOCS) -->
## How to use
The `@analytics/crazy-egg` package works in [the browser](#browser-usage). To use, install the package, include in your project and initialize the plugin with [analytics](https://www.npmjs.com/package/analytics).
Below is an example of how to use the browser plugin.
```js
import Analytics from 'analytics'
import exports from '@analytics/crazy-egg'
const analytics = Analytics({
app: 'awesome-app',
plugins: [
// This will load crazy egg on to the page
crazyEgg({
accountNumber: '1234578'
})
]
})
```
See [additional implementation examples](#additional-examples) for more details on using in your project.
## Browser usage
See below from browser API
### Browser API
```js
const analytics = Analytics({
app: 'awesome-app',
plugins: [
// This will load crazy egg on to the page
crazyEgg({
accountNumber: '1234578'
})
]
})
```
**Initialization arguments**
- **pluginConfig** `object` Plugin settings
- **pluginConfig.accountNumber** `string` crazy egg account ID
## Platforms Supported
The `@analytics/crazy-egg` package works in [the browser](#browser-usage)
## Additional examples
Below are additional implementation examples.
<details>
<summary>Using in HTML</summary>
Below is an example of importing via the unpkg CDN. Please note this will pull in the latest version of the package.
```html
<!DOCTYPE html>
<html>
<head>
<title>Using @analytics/crazy-egg in HTML</title>
<script src="https://unpkg.com/analytics/dist/analytics.min.js"></script>
<script src="https://unpkg.com/@analytics/crazy-egg/dist/@analytics/crazy-egg.min.js"></script>
<script type="text/javascript">
/* Initialize analytics */
var Analytics = _analytics.init({
app: 'my-app-name',
plugins: [
// This will load crazy egg on to the page
crazyEgg({
accountNumber: '1234578'
})
]
})
</script>
</head>
<body>
....
</body>
</html>
```
</details>
<details>
<summary>Using in HTML via ES Modules</summary>
Using `@analytics/crazy-egg` in ESM modules.
```html
<!DOCTYPE html>
<html>
<head>
<title>Using @analytics/crazy-egg in HTML via ESModules</title>
<script>
// Polyfill process.
// **Note**: Because `import`s are hoisted, we need a separate, prior <script> block.
window.process = window.process || { env: { NODE_ENV: 'production' } }
</script>
<script type="module">
import analytics from 'https://unpkg.com/analytics/lib/analytics.browser.es.js?module'
import analyticsCrazyEgg from 'https://unpkg.com/@analytics/crazy-egg/lib/analytics-plugin-crazy-egg.browser.es.js?module'
/* Initialize analytics */
const Analytics = analytics({
app: 'analytics-html-demo',
debug: true,
plugins: [
// This will load crazy egg on to the page
crazyEgg({
accountNumber: '1234578'
})
// ... add any other third party analytics plugins
]
})
</script>
</head>
<body>
....
</body>
</html>
```
</details>
<!-- AUTO-GENERATED-CONTENT:END (PLUGIN_DOCS) -->
## Usage

@@ -17,0 +178,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