3.1.0 • Published 4 years ago

@d-cat/utility-custom-dimension-builder v3.1.0

Weekly downloads
13
License
ISC
Repository
gitlab
Last release
4 years ago

Getting started with @d-cat/utility-custom-dimension-builder

codecov

Utility template that is designed for @d-cat/tag-manager to return a @d-cat/ddm-core object based on a comma seperated string.

Install

npm i @d-cat/utility-custom-dimension-builder

Usage

An array with objects should be passed where the key stands for the key of the returned object and the value DDM keys as comma seperated string. The first key that's found is returned.

import { set } from '@d-cat/digital-data-manager';
import customDimensionBuilder from '@d-cat/utility-custom-dimension-builder';

// set page.host
set('page.host', 'https://ziggo.nl');

// set user.cust_status_ziggo
set('user.cust_status_ziggo', true);

const arr = [
  {
    key: 'cd1',
    value: 'page.host',
  },
  {
    key: 'cd40',
    value: 'user.custStatus.ziggo, user.cust_status_ziggo',
  },
];

const outputObject = customDimensionBuilder(obj); // { cd1: 'https://ziggo.nl', cd40: true }
3.1.0

4 years ago

3.0.2

4 years ago

3.0.0

4 years ago

2.0.0

4 years ago

0.3.0

4 years ago

0.2.0

4 years ago

0.1.0

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago