Socket
Book a DemoInstallSign in
Socket

@fantassin/axeptio

Package Overview
Dependencies
Maintainers
3
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fantassin/axeptio

Manage tracking scripts with Axeptio.

latest
Source
npmnpm
Version
1.0.3
Version published
Maintainers
3
Created
Source

Manage tracking scripts with Axeptio.

📦 How to install this project ?

npm install @fantassin/axeptio

⚡ How it works ?

import { Axeptio, GoogleAnalytics, GoogleTagManager } from '@fantassin/axeptio';

const settings = {
    clientId: 'axeptioId'
};

const axeptio = new Axeptio( settings );

// Add tracking strategies.
axeptio.add( new GoogleAnalytics( 'UA-propertyId' ) );
axeptio.add( new GoogleTagManager( 'GTM-propertyId' ) );

// Load Axeptio script.
axeptio.init()

In the settings you can use all the Axeption SDK params, for more information see the documention https://developers.axeptio.eu/sdk/integration-du-sdk.

If you don't know which object to create you can use GoogleAnalyticsFactory, for example :

import { GoogleAnalyticsFactory } from '@fantassin/axeptio';

const factory = GoogleAnalyticsFactory();

// Create a Google Analytics object.
axeptio.add( factory.createGoogleAnalytics( 'UA-propertyId' ) );
// Create a Google Analytics 4 object.
axeptio.add( factory.createGoogleAnalytics( 'G-propertyId' ) ); 

FAQs

Package last updated on 22 Jun 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts