🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more →
Socket
Book a DemoInstallSign in
Socket

@membergetmember/integration

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@membergetmember/integration

Membergetmember advertiser integration

latest
npmnpm
Version
0.0.6
Version published
Maintainers
1
Created
Source

Member get member advertiser integration

Installation

Using yarn

yarn add @membergetmember/integration

Using npm

npm install @membergetmember/integration

Setup integration

To set up an integration first you need to start an IntegrationService

  • Replace the demo shop ID (XXX) with your actual shop ID provided to you by MemberGetMember
import {IntegrationConfigInterface, IntegrationService, LanguageEnum} from '@membergetmember/integration';

const shopId: string = '053227a2-1036-11ee-be56-0242ac120002';

const integrationService: IntegrationService = new IntegrationService(<IntegrationConfigInterface>{
	shopId,
	language: LanguageEnum.ENGLISH,
});

Inline integration

integrationService.showInContainer(
	document.querySelector('#myUniqueElementReference')
);

Popup on button

<button onclick="integrationService.showAsPopup()" type="button">Click me</button>

Popup on load

document.addEventListener('DOMContentLoaded', () => integrationService.showAsPopup());

Alternate usage (commonjs)

Setup integration

const memberGetMember = require('@membergetmember/integration');
const shopId: string = '053227a2-1036-11ee-be56-0242ac120002';

const integrationService: memberGetMember.IntegrationService = new memberGetMember.IntegrationService({shopId});

Alternate usage manual import

Storing incoming requests

Add the following piece of code to the root of your app so that it loads on every page and stores any received dci.

<script src="/path/to/build/mgm-integration-bundle.min.js"></script>

Registering sale/lead

async await method

const shopId = '053227a2-1036-11ee-be56-0242ac120002';

const integrationService = new memberGetMember({shopId: shopId});

Keywords

Membergetmember

FAQs

Package last updated on 06 Jul 2023

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