Send hit scope dimension with session info to analytics

Good morning.

I created a Hit Scope dimension in analytics to store the most accessed subcategories of a website. I followed the instructions to send the data with an identify call, however, this is not allowing me to generate a report using the pages/sessions, page views, session duration and etc. I can just get the users and hits.

According to the docs we should send the userId inside the identify call to achieve this result, however, this is not working.

Could someone explain me what should I do to make it possible?

The code that's being used is this one:


analytics.identify(analytics.user().anonymousId(), {
  subcategoryDimension: 'Subcategory A'


Link for custom dimention: https://segment.com/docs/destinations/google-analytics/

Link about sending session info: https://segment.com/docs/spec/identify/


Thank you!

2replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • One more thing, it seems the page view is not being added to the custom dimension, because I can't filter in the custom reports.

    I'll keep waiting.

    Thank you.

    Reply Upvote
  • Hi Crisley ,

    Thanks for reaching out and thank you for your patience. Segment Page calls, in general, will be mapped as pageviews in Google Analytics. However, any customer dimension that you want to map to a hit scope will need to be specifically mapped in your 'Custom Dimensions' setting for you Segment Google Analytics destination settings. This means you can map a specific property from a page call to a hit scope in Google Analytics. Does that make sense?

    I would also like to take a moment to let you know if you ever have any issue that is pressing or if you would like any help with something is specific to your implementation then the I strongly recommend opening a ticket rather than posting in our community board. 🙂

    Reply Upvote