File tree Expand file tree Collapse file tree 3 files changed +26
-2
lines changed
packages/connectors/datalayer/src Expand file tree Collapse file tree 3 files changed +26
-2
lines changed Original file line number Diff line number Diff line change @@ -45,4 +45,29 @@ describe('commands', () => {
4545 analytics : true ,
4646 } ) ;
4747 } ) ;
48+
49+ test ( 'set' , ( ) => {
50+ connectorDataLayer ( {
51+ elb,
52+ mapping : {
53+ 'set campaign' : {
54+ name : 'walker globals' ,
55+ command : true ,
56+ custom : {
57+ data : {
58+ term : 'term' ,
59+ } ,
60+ } ,
61+ } ,
62+ } ,
63+ } ) ;
64+
65+ gtag ( 'set' , 'campaign' , {
66+ term : 'running+shoes' ,
67+ } ) ;
68+
69+ expect ( elb ) . toHaveBeenNthCalledWith ( 1 , 'walker globals' , {
70+ term : 'running+shoes' ,
71+ } ) ;
72+ } ) ;
4873} ) ;
Original file line number Diff line number Diff line change @@ -25,7 +25,6 @@ const defaultMapping: Mapping = {
2525 } ,
2626 } ,
2727 } ,
28- // @TODO set for globals
2928} ;
3029
3130export function objToEvent ( config : Config , obj : unknown ) : MappedEvent | void {
Original file line number Diff line number Diff line change @@ -10,8 +10,8 @@ export type DataLayer = Array<unknown>;
1010export interface Config {
1111 elb : WalkerOS . Elb ;
1212 dataLayer : DataLayer ;
13- name ?: string ;
1413 mapping ?: Mapping ;
14+ name ?: string ;
1515 prefix : string ;
1616 processedEvents : Set < string > ;
1717}
You can’t perform that action at this time.
0 commit comments