What is a 'product' in Google Analytics? - google-analytics

In plain English, what is a 'product' in Google Analytics?
I ask because I'm trying to work out which Custom Metrics to set to Scope:Hit and which to set to Scope:Product. I assume a "hit" is just like the website hits we used to talk about in the 90s. But Google's explanation only makes sense if you also know what they mean by "product".
When a custom dimension has product-level scope, the value is only
applied to the product with which the value is set. Because multiple
products can be sent in a single hit, multiple product-level scoped
custom dimensions can be sent in a single hit.

As far as I know product data only exists with the new enhanced e-commerce-features** and is identified by one of the (unique) fields "id" or "name". There a several optional fields to add product details (see documentation).
The difference between "normal" and enhaced e-commerce tracking is that previously product data was recorded only on the confirmation pages, now you can do stuff like tracking a shopping basket or product lists (plus you need a different tracking library and a different syntax).
** At least all examples I found refered to enhanced ecommerce tracking and the classic e-commerce tracking does not have an "id" field. However the documentation does not explicitly say that product scope does not work with classic ecommerce, that's just an educated guess if mine.

Related

What is the proper way to tag pages in Google Analytics?

I don't even know if "tagging pages" is what I mean.
Essentially, I have a large education website with many types of pages. Specifically, I want to tag our program pages by faculty, level, etc. For example, the Biology program page would be tagged with Science (as its faculty), and Undergraduate (as its level). It's possible that a program could belong to multiple faculties and/or levels (Psychology, for instance, is both a Science program and an Arts program). There is nothing in the URL to signify faculty or level. The website is built in Drupal, in case you know of any modules that could facilitate this.
I want to understand how different faculties/levels/etc perform. I will be building reports in Google Data Studio.
Any guidance would be appreciated!
What you are looking for is called 'content grouping'. If you haven't information in the URL you can define some rules when the page loads and pass the information to Analytics with the pageviews.
You can find more information here:
https://support.google.com/analytics/answer/2853423?hl=en
Then you can get these information from Data Studio.
Because of your multi-value needs, nothing in GA is going to satisfy your requirements out of the box. You will have to do some post-processing, and I am not familiar enough with Data Studio to know where its limits are in that regard.
As the previous poster suggested, Content Grouping is the standard way to create custom aggregations of pages. You can have multiple content groupings, such as Faculty and Level, but a page can be in only one group per grouping (not the clearest terminology but it appears to be what Google uses).
A different option is Custom Dimensions. There are two options here. One is to create custom dimensions for Level and Faculty. Each page can still have only one value per dimension, but you could send a comma-delimited string when a department is in multiple faculties (for instance) and then pull it apart again in a spreadsheet.
The second option is to create a custom dimension for Department directly, and associate each department to the appropriate one or more faculties and levels in your reporting.
How you set the custom dimensions or content grouping will depend on your implementation of GA. If you are using the Google Analytics Drupal module, it says it supports setting custom dimensions as a feature. If you are using Google Tag Manager you can set the dimension value in your tags directly, though of course it will need to decide what value to set on based on either totally enumerated rules you write or something it can read out of the page. Here is some Tag Manager documentation: Content Grouping via GTM; Custom Dimensions via GTM.
If the department is present in the page in some consistently marked-up way you can grab it; if not the Metatag module or one of its schema.org extensions might be able to provide you a spot to set a value for GTM to retrieve.

Can enhanced ecommerce variables be used to send non-enhanced ecommerce events? How do I determine that?

I am using the data layer inspector to look at events being fired from an e-commerce website. I have an event which I don't think is an enhanced e-commerce one but it is using enhanced e-commerce variables. How do I know if this is being pushed through to Google Analytics or not (no access to the tool evidently)? Which parameter on the code will tell me if this is an enhanced e-commerce event or not?
I am not giving details from the website:
The event category is "stock".
pa: "detail",
I see the basic product index variables such as ID, name, brand category.
I also see custom product index dimensions being sent.
I want to understand when I can use product index dimensions and when I cannot and I want to understand what are the enhanced ecommerce events.
There is no special parameter in the requests that says standard/enhanced e-commerce. Rather a) your view must be configured for Standard- or Enhanced E-Commerce, and b) the structure of your request must match the view configuration.
I want to understand when I can use product index dimensions and when
I cannot
Simple, product scope dimensions are available only in EEC.
and I want to understand what are the enhanced ecommerce events
product impressions (usually as part of some sort if product list)
clicks in product lists (together with impression tracking this will give you click-through rates for viewed products)
product details
add/remove from cart
checkout (with a number of configurable steps, e.g. "enter billing/shipping address", "select payment" or similar - the name and number of the steps is configurable and is displayed as a funnel in the GA interface)
purchase
refund (more often done via imports in the GA backend than in code)
You can also measure internal promotions (e.g. if you have a banner that links to special offers in your site).
Ivj's answer already gave the links to the documentation where the steps are explained in detail.
Standard E-Commcerce has only transaction tracking and no other E-Commerce events.

Is it possible to track actual affiliate sales in Google analytics

I have a website that I built and am getting sales everyday now via "affiliate window" I was curious if it was possible to track the commission in analytics so I am able to see what pages are performing the best?
Thanks
You should look into purpose-built affiliate trackers. Voluum, Thrive, Adsbridge etc. CharlesNgo.com has a lot of info about these.
You can also use these trackers to dynamically insert user data into your landing pages, and they are a lot easier than GA to use. Example: https://charlesngo.com/how-to-insert-user-data-into-landing-pages-using-voluum-tokens/
After a clarifying comment: Yes, you can do this, although with some caveats (one of them that it might not be worth the effort unless you make a lot from your affiliate pages).
You can do data imports, and more specifically you can add data to urls (there are different kinds of data import and "content data" is one of them).
You need a dataset that contains a "key" field that is used to match external data to GA data and one or more fields with values you want to import.
Imported data is always dimensions, i.e. categorical data (that is per Documentation The interface allow to to select custom metrics, but I have not yet tried this and cannot give any guidance on how that would work). So if you try to import revenue you have the problem that new entries will not be added to existing entries, they will replace them
What I would probably do is to sort the data from the "affiliate window" into three categories (low, medium, high), and then prepare a csv file with the urls as first column and the categories as second column.
Then create a custom dimension with a name of i.e. "performance" (else you'd have to overwrite an existing dimension in GA and you probably not want that).
Both custom dimensions and data imports are created on a property level (however you can apply an import to a specific view and I would urge you to test this on a test view first). So in the property settings go to data import, new, content data. Key will be "page", Imported data will be the custom dimension you just created. Check "overwrite hit data" (else the data will not change after the first import, however note that this might make comparisons between different timeframes difficult).
Download the "schema" file (simply a template for your csv upload file in which you insert your data). Click finish.
Next go to data imports, "manage uploads" and upload the file. Processing will take a day or so (errors, if any, you will see shortly after the upload).
Then go to your content reports, select your custom dimension as secondary dimension and you will if the url in question was a low, medium or high performer.
You can automate this via the GA API, bit that's a bit beyond an SO answer.
---- (old answer)---
This is actually what campaign parameters are for. Your affiliate links should be tagged with campaign parameters, e.g.
http://example.com/?utm_medium=affiliate&utm_source=[[Affliate
Name]]&utm_campaign=[[Campaign Name]]
The things in the angled brackets are placeholders, you would replace those with the name of your affiliate and the name of your campaign.
Now you can look into the aquisition reports and group by source (values for all affiliate links), by source (breakdown by affiliate name) or campaigns, or combinations thereof.
However tracking the commission you pay out via Google Analytics is probably not a good idea, at least from the point of view of your affiliates - JavaScript based tracking is not necessarily accurate enough to track billable services (some people have js disabled or opted out of GA or use adblockers that block tracking etc).
Yes it's possible. You can use sub-id's and fill them with unique visitor data (Google Analytics Used ID). Once an affiliate sale is tracked in an affiliate network, you'll get the sub-id that generated the sale. You can now push that sale to google analytics and let google analytics match the visitor data with their data, showing you the full visitor reports (including landingpage info etc.). You need developer skills to get this working with your affiliate networks but there are complete easy to use tools that does the trick for you such as Ivanhoe.io and Coincrack.

google analytics op_scope for page tracking

Javascript Google Analytics provides a setCustomVar method that allows us to submit custom data that will appear on the reports. I'm not clear on the opt_scope parameter however:
opt_scope Optional. The scope used for the custom variable. Possible values are 1 for visitor-level, 2 for session-level, and 3 for page-level.
https://developers.google.com/analytics/devguides/collection/gajs/methods/gaJSApiBasicConfiguration#_gat.GA_Tracker_._setCustomVar
Where can I find more information about these three options?
Tracking Custom Variables has a good description of the custom variable scope in Google Analytics.
Each of these three levels of interaction defines a specific scope of visitor engagement. This distinction is important to custom variables because each custom variable is restricted to a particular scope. For example, you might want to know the number of sessions where visitors removed an item from their shopping cart. For that particular case, you would define the custom variable to the session level, so that the entire session for that visitor is flagged as one in which items were removed from online carts.

Google Analytics: Using custom variables to track growing values

I believe custom variables in Google Analytics can only be used to track the distribution of different values for that variable over time.
Suppose I have a forum and want to track the total number of posts made in that forum. Could I track them over time with Google Analytics, too? And how?
Custom Variables are a user-based dimension. So, traditionally, instead of measuring forum posts, they'd instead identify users who post on forums. That doesn't seem like what you're trying to measure.
Instead, you should consider looking at Event Tracking. Specifically, they allow for the tracking of 4 separate data points (per hit): 3 strings and a integer value.
So, you could use this to track when posts happen, or when comments happen on those posts, and then aggregate the values by whatever dimension you like using the API. You'd just need to bind the event to occur at the times you intend, with the data you want to track.
So, an example event call for you, tied to whenever someone posts a comment on a forum topic:
_gaq.push(['_trackEvent', 'Form Posts', 'Comment', topic_name, 1]);
You could then use the API to query particular views to tabulate whatever aspect of the event you want to aggregate. You can simulate those calls with the Google Analytics API Query Explorer. In this example, you could get number of Comments per day using Dimension set to ga:date, Metric set to ga:totalEvents, and then set the filter field to ga:eventAction==Comment

Resources