Custom dimensions scope - google-analytics

I'm working on the definition of the GA model for a widget which will be installed on different sites.
I want to correlate information as the widget owner ID and the widget content ID in GA with page views and sessions.
After some reading at https://support.google.com/analytics, I discovered GA custom dimensions (CD) and custom metrics (CM).
Now I'm trying to figure out which scope level to use.
Based on the GA docs:
Not every metric can be combined with every dimension. Each dimension and metric has a scope: user-level, session-level, or hit-level. In most cases, it only makes sense to combine dimensions and metrics that share the same scope.
That said, and taking into consideration the following:
ownerId: variable containing the id of the client (owner) of the widget.
contentId: variable containing the id of the content shown in the widget.
What's the best way to set up custom dimensions for ownerId and contentId? More precisely:
To analyse the user behavior in relation to widget owners how should the scope be set in the custom dimension? Is it a hit-level scope?
And to know the total number of sessions in relation to widget owners? should the scope be set to session-level? Can a hit-level scoped custom dimension be used in this case?
Do I need to set up 2 custom dimensions each one with a different scope level to achieve both analyses?
And what about the contentId custom dimension in a similar case?
Please, any comment or suggestion will be appreciated. Thanks!

Related

Custom Dimensions within Custom Dimensions in Google Analytics

Within the unpaid version of Google Analytics, you are limited to 20 custom dimensions per property/view. As a workaround, I am currently attempting to create a custom dimension table within the existing custom dimensions in Google Analytics. In essence, I am trying to use an index and value custom dimension as a custom dimension table within itself. The problem that I am trying to solve is with a 6sense GA integration, currently, 6sense takes up 17 out of the 20 available custom dimensions. I want to consolidate these 17 custom dimensions into a lookup table variable that is pulling from the 6sense companyData variable in the dataLayer: 6sense Lookup Table Variable
The problems that I am running into are this:
Once I have this configured how do I access each of these indexed values in GA?
As it is configured, would it still allow for granular Session data (Session, Bounce Rate, Goal Completions, etc.)?
Any ideas, help, suggestions are all appreciated. Thanks in advance!
The value of the custom dimension is a string, you cannot use it as a lookup. The way you are trying it won't work, because if for example the dimension is at the session or user level, the next value will replace the previous one within that session, therefore you would lose all the previous values and the last one sent to that index would 'win' and it will be the value of that custom dimension of the session.
An alternative solution could be to create a string with the information of interest concatenated and send it in a custom dimension (always considering that if this string changes, the one sent as last to Analytics in the session is saved, for session and user level hits).

Use of dynamic MDX Categories in Global Filters in the icCube application (dashboard)

Situation
I've defined a couple of MDX++ Categories in icCube and I want to use these as Global Filters in the application. An example of a MDX++ Categorie is
create category member [Stats].[Top 100 Leveranciers].[Totaal].[top 100] as
order(TopCount([leverancier].[leverancier].[leverancier],100, [measures].[bedrag]),[measures].[bedrag], bdesc),
add_children=true
If I use this as a Global Filter in the application, all my dashboards are filtered, showing the data for the "Top 100 Leveranciers". Perfect, so far.
Now comes the problem/ question
Some users have a security setting that allows them to see only a subset of the data. The "Top 100 Leveranciers" should therefore be different to them, then to users that can view all the data. But, it is not. The "Top 100 Leveranciers" give exactly the same members for the persons with access to sub-set as to users that can access all.
--> How can I achieve the desired functionality in icCube?
My analysis
This is what I believe is happening 'under-the-hood':
To include a CATEGORY as a global filter option, it has to be defined in the SCHEMA DEFINITION as a SCRIPT. It is only allowed (so far) to have STATIC categories in the script. So I guess I am looking on ways to create CATEGORIES that can be used as global filters, but are DYNAMIC for dashboard users.
Not sure to understand why the Top members are not filtered by the actual user access rights: should be the case. Better to contact icCube support directly.
Here is a quick details about STATIC vs DYNAMIC evaluation of the categories from the online documentation:
STATIC | DYNAMIC : an optional modifier to specify the evaluation context. The default value is DYNAMIC:
in that case, when evaluating the formula the list of members is filtered by the slicer
and/or sub-select content. In STATIC mode, slicer and sub-select are ignored.

What is the best way to neglect undefined variables in GTM , Where the data is not availble .

I have implemented GTM and GA with event based tracking. Alongside events tracking I have implemented custom dimensions and Custom Variables. In all the pages All defined Custom metrics and dimensions are populated according to needs , which is giving empty data in some cases.
for Ex. When user Registers on our page their Registration will be added to data layer object for custom dimensions but this info is not available on every part of the website..
Kindly help and suggest what to do . Do I need to create several tags for specific conditions or track the issues with develops where they can give custom info when the data is not available .
If you pass in an "undefined" value to a custom dimension or metric then Google Analytics will just treat it as if the dimension or metric was not set at all. I.e. you will not have "undefined" in your reports, but no value at all. So you could just ignore the issue.
As an alternative you could set a default value that is used when no other value is available (i.e. for filtering).

Need to find out a drop offs from purchasing per type of user

My client need to find out a drop offs in purchasing process per type of user and per type of industry.
FYI- these both user type and industry type need to select the user while registring to the website. And user can see the products only once they loggedin.
So, what needs to be done for achieving this to track in google dashboard
thanks
On Login set the user type and industry as session scoped custom dimensions. Go to your analytics account, property settings, custom definitions, create a custom dimension, set scope to session (that way you need it to set only once per session, with a hit based dimension you'd need to send this with every pageview).
On your login confirmation page add the custom dimension:
ga('send', 'pageview', {
'dimension1': 'usertype',
'dimension2': 'industry',
});
Custom dimensions are specified as key/value pairs; the key is he string "dimensions" plus the numeric index of the dimension, the values you'd have to extract from your backend for each user when he logs in. It takes at least 24 hours until values for custom dimensions show up (well, at least for me).
Based on those custom dimensions you can create segments in the Analytics interface and do any analysis you like. You should probably create a goal with a funnel for your sales, and then apply the segment to the funnel view (or the goal flow view) to see where users drop of.

Drupal: relating two fields with each other

I have two fields: Supervisor and agent in a new content type. The list of agents depends on the supervisor selected. How can I create such a dependency i.e. each time a different supervisor is selected from a list a new list of agents is set?
Do I need to set up the supervisor and the agents each as nodes and then use entity reference?
How can I set up the dependency in the content type?
Cannot ask for clarification since I'm new here but here goes
Taxonomy terms can be a solution to the problem depending on the amount of information Supervisor and agent holds. If they hold information like phonenumbers, adresses, names etc. then they need a content type. If these are in fact references to users in the system then you need to use those users. If it's just for categorization, taxonomy terms will work just fine.
Set up the Supervisor as the parent term and the agents as children. Then use a widget like this one to handle the input: https://drupal.org/project/term_reference_tree
Afterwards you can retrieve and show data based on which term/agent is relevant.

Resources