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

@financial-times/n-tracking

Package Overview
Dependencies
Maintainers
16
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@financial-times/n-tracking - npm Package Compare versions

Comparing version 1.0.0-beta.2 to 1.0.0-beta.3

4

dist/server.js

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

function CoreTracking({
options
appContext
}) {
// We only need the basics as the full data cannot be assembled
// on the server without the client-side JS.
const context = formatAppContext(options.appContext);
const context = formatAppContext(appContext);
const trackingData = {

@@ -76,0 +76,0 @@ category: 'page',

@@ -6,3 +6,3 @@ {

"browser": "dist/browser.js",
"version": "1.0.0-beta.2",
"version": "1.0.0-beta.3",
"license": "MIT",

@@ -9,0 +9,0 @@ "repository": "Financial-Times/n-tracking.git",

# @financial-times/n-tracking [![CircleCI](https://circleci.com/gh/Financial-Times/n-tracking/tree/master.svg?style=svg)](https://circleci.com/gh/Financial-Times/n-tracking/tree/master)
This package provides client-side tracking initialisation for FT.com. On the client-side it configures [o-tracking] (which is used to capture and send tracking events to [Spoor]) and can be used on the server-side to embed fallback tracking pixels.
This package provides tracking initialisation for FT.com. On the client-side it configures [o-tracking] (which is used to capture and send tracking events to [Spoor]) and for the server-side it provides components which render fallback tracking pixels .

@@ -24,5 +24,10 @@ [o-tracking]: https://github.com/Financial-Times/o-tracking

```js
import * as tracking from '@financial-times/n-tracking';
import * as nTracking from '@financial-times/n-tracking';
const oTracking = tracking.init(options);
const oTracking = nTracking.init(options);
nTracking.broadcast('oTracking.event', {
category: 'page',
action: 'custom-event',
});
```

@@ -40,3 +45,3 @@

<CoreTracking options={options} />
<CoreTracking {...options} />
```

@@ -64,5 +69,5 @@

### `<CoreTracking options={} />`
### `<CoreTracking />`
Renders a `<noscript>` and inline `<script>` element to embed fallback tracking pixels into the page which are used when the client-side JS fails to run. It accepts the same [options](#options) as the client-side code.
Renders a `<noscript>` and inline `<script>` element to embed fallback tracking pixels into the page which can be used when the client-side JS fails to run. It accepts the same [options](#options) as the client-side code.

@@ -69,0 +74,0 @@

@@ -8,6 +8,6 @@ import React from 'react';

export function CoreTracking({ options }) {
export function CoreTracking({ appContext }) {
// We only need the basics as the full data cannot be assembled
// on the server without the client-side JS.
const context = formatAppContext(options.appContext);
const context = formatAppContext(appContext);

@@ -14,0 +14,0 @@ const trackingData = {

Sorry, the diff of this file is too big to display

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