All viewed pages data until transaction from Google Analytics - r

I want to get the page view data from Google Analytics using R. I am using googleAnalyticsR package for getting these data using R.
Currently, I can get the landingPagePath, secondPagePath, previousPagePath, exitPagePath information. But I want to get the whole viewed pages in that session which transaction occurred. For instance, let's say a visitor came to the my website and logged in. After that s/he visited in pages titled as below in a given order
Page1 > Page2 > Page1 > Category > Product12 > Product13 > Basket > Checkout
I want to get this view flow as it is. I cannot do it using google analytics api's metrics & dimensions for page tracking.
How can I get the full 'view flow' data? Can I create such a report using only google analytics reports? Or should I try something else?
Thanks for any advice,
Best.

Google Analytics is basically a database where every hit (pageview, event, etc) is a single row. Try fetching these dimensions:
Page
Date, Hour, Minute, Second
metrics:
Pageviews
sort by Date, Hour, Minute, Second
Once you got all the data, create logic in R finding most common pathes.
Normally, BigQuery is used for such tasks (if you have Analytics 360 - GMP, payed version off GA). In BigQuery you have hit number

Related

Pageviews and views differences between GA4 and Universal

Working on "converting" a Google Data Studio report from Universal to GA4 and I am noticing a significant differences with some metrics, such as new users and pageviews
In Universal, I got this for Pageviews
But I am getting these results on GA4 for the exact same period:
The same for new users:
Vs GA4
I know GA4 and Universal are tracking metrics differently , but it looks to me that the numbers are way different
What am I missing here?
I was looking where you were initially and had the same reaction, until I realized that in GA4, the pageview stat is considered an Event and when I went to that section, I found the far more accurate stat (still slightly off from UA but within that percentage margin that Google states may exist). Navigate to Reports > Engagement > Events. The page_view Event should have the more accurate total you are looking for when comparing to the Page View number traditionally found in UA.
Do you have any filter to remove query parameters in Universal Analytics?
GA4 does not have filters to remove query parameters. Is your home page, landing page for your campaigns?
In GA4, the dimension you have selected is page path + Query String. In this case URL [page path] will also have details of query parameters.
There might be multiple rows present with home page URL with query parameters appended.

Google Tag Manager click event tracking working but not displaying anywhere

I have successfully created a GTM trigger and tag using the click_text parameter. When I preview and when I published the change both were successful in showing up on my Google Analytics 4 debug and real time tabs. I cannot seem to find a recorded total for this new tag trigger in either GTM or GA4 anywhere. Does this exist in either of these, or do I need to create an event in GA4 unrelated to what I set up in GTM. I have read most of Google's provided documentation on this specific step and it stops flat at this step of things.
Thank you in advance.
If you see your event in real time data report in GA, you're good. The data is in that property. It, however, is not yet available for aggregation, so you won't be able to count them or use them in other reports.
You should wait up to two days for the data to be in the non-real time reports. Vast majority of the data will be available for aggregation in one day, however. Some starts showing up in hours. GA 360 (paid version of GA) shortens the two days to four hours until all data is there.
I'd also suggest using Adswerve plugin for GA debugging: it will print all DataLayer changes as well as everything that is being sent to GA in the console. It's much more comfortable than using real time hits report and it will show you all dimensions that are being sent to GA.

Create a goal in Google Analytics from the last two visited pages where the last one is goal destination url

I have to calculate the conversion rate for an ecommerce website which had no defined goals for a long period of time. Aside that the success page had no distinct url than the order view page.
However I am able to identify a conversion by filtering the order-view pageviews -
where users are redirected after they place an order - by the traffic that came only from shopping-cart page.
Basically I will know an order was placed if the user that reached order view page came directly from the shopping cart page.
So my question is: can I create a goal in google analytics that will compute the conversion rate from these two steps starting with installing Google Analitycs?
Thank you!

Google AdWords Conversions not matching database entries

I've just set up a tool on a client site that users can use to request a quote from our client. To do this the user lands on a form page, fills in their details, submits and then lands on a thank-you page. Pretty basic.
I set this process up as a goal in Google Analytics, using the destination type goal: "begins with /thank-you" and shared that goal as a conversion in Google AdWords.
I decided to run a few Google AdWords ads to promote the tool. I also wanted to double-check the conversion data that AdWords gives you so I set the destination URL in Adwords to www.example.com/form-page?adsrc=adwords1 (2, 3, 4 etc. for each ad) and I configured the DB so that there was a column that tracked which URL the user was on when filling in the form (this would be the column I counted to get the number of conversions that came from AdWords so I could compare)
Further to this, I made sure that the initial URL parameters that the user landed on were stored in the session so that if the user browsed to other pages and came back to fill in the form later, it would still attribute the conversion to AdWords.
I tested this thoroughly on a staging and production environment and everything was working correctly.
I ran the campaign for a week and when I checked, the conversion results in the Data Base vs the ones coming from AdWords are wildly different. The DB tells me I've had 5 conversions while AdWords gives me 21.
Is there anything in the way Google uses its gclid that may be causing this issue? Or is there a problem with the way I've set up the measurement structure?
This can be caused by few things, but I think this is the GA/AdWords issue, more than your DB/session set-up.
Gclid shouldn't influence your goal, since it is used only for AdWords/Analytics interactions, Goals should not be affected in your set-up.
https://support.google.com/analytics/answer/2938246?hl=en
Probable cause: If your goal set-up only contains "begins with /thank-you", isn't it possible, that you are counting all the sessions which reach thanks-you page? Not just AdWords?
Solution: if you need to count conversions in AdWords (for performance improvements), use AdWords conversion code at the same page, this counts only those users, who clicks an ad and reach your thank-you page in x (default 30) days. Be sure to count only unique conversions (users by cookie).
Differences between GA/AdWords conversion count:
https://support.google.com/analytics/answer/2679221?hl=en
Google attributes conversions to the last marketing channel, where direct visits do not count as a marketing channel (if you look at their attribution flow visualization you see that the penultimate step is to check for existing campaign information for the user). So GA might overcount Adwords visits (or other campaigns) and conversely shows fewer conversions for direct visits.
On contrast your database probably records the last traffic channel without an elaborate attribution model, so it will show less campaign traffic.
Also IIRC the adwords interface records the conversion for the time of the ad click, not the actual goal conversion, so the timeframes for the conversions differ.

Can Google Analytics show me visits by hour?

I am interested in seeing visits on my site broken down by hour - is there any way to generate a report of this in Google Analytics? It appears that all metrics are only broken down by day. Maybe I can get this information through the GA API?
Since Google Analytics was revised the currently accepted answer is no longer available. The current version of Google Analytics will let you view visitors per hour:
Go to the Reporting Tab
Select "Audience"
Select "Overview"
Select "Hourly"
If you're trying to determine total traffic by hour of the day for a given date range then you can use this custom report:
https://www.google.com/analytics/web/permalink?type=custom_report&uid=pToP7693ReSxfSIpbqHmWg
Only a few reports have hour-by-hour data; as far as I know, they're all in the 'Visitors' section.
For example, to see Visits by hour over a period of time, click Visits, Visitor Trending, then Visitors. Then, in the top right of the report, select Graph by: (icon of a clock)
All of the reports under Visitor Trending have hour-by-hour data, except Absolute Unique Visitors.
As far as the API goes, you can check what query combinations are valid here (since there are restrictions): http://code.google.com/apis/analytics/docs/gdata/gdataReferenceDimensionsMetrics.html
According to that, all metrics can be viewed by an hourly dimension except Campaign metrics and Visitor (not to be confused with Visit) metrics.
You can test the query you want to run with the Google Analytics Data Feed Query Explorer
If using a (downloadable, emailable) custom report is an option, you can use the custom report described on http://salman-w.blogspot.com/2012/07/analytics-day-of-week-hour-of-day-report.html
The article tells you to do the following:
Create a custom report with flat table (I am sure it will work with explorer style reports too)
Add the dimension hour (not hour of day)
Add the metric visits, pageviews, etc
Preview

Resources