objective c - Non-screenview events with Google Tag Manager on iOS -


we're trying use gtm on ios track non-screenview events using data layer , cannot work. first, here's our call gtm:

nslog(@"voted!"); nslog(@"question: %@, answer: %@",self.question.question,selectedanswer.answer); [[atitracking instance] trackeventwithtagmanager:@"didvote" parameters:@{@"questionvalue":self.question.question,@"votevalue":selectedanswer.answer}]; 

we have 2 data layer variables set in gtm questionvalue , votevalue. see: https://www.dropbox.com/s/jru5a06vs1bfmm3/variables.jpg?dl=0

and here's our trigger event set didvote: https://www.dropbox.com/s/0ydxml4yemji2f5/trigger.jpg?dl=0

and our event tag uses trigger above (cannot post link due rep limit.)

has seen non-screenview event tracked in ios using gtm? in advance.

events working me no problems. modified code gtm ios sdk example

-(void) logevent:(nsstring*) event withproperties:(nsdictionary*) properties {     nsmutabledictionary* eventproperties = [nsmutabledictionary dictionarywithdictionary:@{@"event": @"customevent",@"eventcategory":@"user action",@"eventname":event}];     if (properties) {         [eventproperties addentriesfromdictionary:properties];     }     tagdatalayer* datalayer = self.tagmanager.datalayer;     [datalayer push:eventproperties]; } 

based on gtm documentation https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#events event category , event action must not empty. didn't see events in ga until configured these parameters in tag , started pushing them client. hope helps.

please see attached screenshot of tag:

enter image description here


Comments

Popular posts from this blog

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -

YouTubePlayerFragment cannot be cast to android.support.v4.app.Fragment -