Nayan Srivastava
Nayan Srivastava

Reputation: 3725

GTM sets screenname to (not set)

I am trying to send screen-view hits to Google Analytics using Google Tag Manager, but in the real time view it is showing screenName value as (not set). Actual screenNames are also shown but along with them (not set) is also reported. Can someone please point out what I am missing.

Upvotes: 0

Views: 1169

Answers (1)

ely87
ely87

Reputation: 126

The way I have set it up is to add a new tag to be able to track the screen-view separately:

----> Full config image example here <----

  1. New tag in the GTM container with "Screen View" Track type

  1. Add in "Fields to Set":

Field Name

screenName //Yes, exactly like that

Value

{{Item Name}} // Yes, exactly like that


  1. Triggering: add a new trigger configuration with

Trigger Type

Custom

Trigger fires on

Some events
Event Name equals view_item


Then, on the Android tracking code:

Make sure you track it like this:

String yourScreenNameString = "Screen One"; //This is an example
Bundle bundle = new Bundle();
bundle.putString(FirebaseAnalytics.Param.ITEM_NAME, yourScreenNameString);
_firebase.logEvent(FirebaseAnalytics.Event.VIEW_ITEM, bundle);

----> Example of how the GTM looks <----

Upvotes: 2

Related Questions