New users broken down by medium totals more than new users - google-analytics

If I grab a breakdown of new users by medium for the month of September and total up the individual rows I get a total of 9,659:
Medium New Users
(none) 1,307
Online other 1
cpc 3,130
display 339
email 29
organic 4,032
referral 821
Query:
https://ga-dev-tools.appspot.com/query-explorer/?start-date=2016-09-01&end-date=2016-09-30&metrics=ga%3AnewUsers&dimensions=ga%3Amedium
But if I grab the total number of new users for the same time period it give me 9,654 which is 5 less:
https://ga-dev-tools.appspot.com/query-explorer/?start-date=2016-09-01&end-date=2016-09-30&metrics=ga%3AnewUsers
(I've removed the ID from these queries as advised by google when sharing the links publicly)
If I use the metric ga:sessions rather than ga:newUsers the numbers total up ok.

Related

WooCommerce Ignores Country Change During Checkout Process

Context
A seller is from one and only one country (M). An end user wants to purchase membership which costs 500 EUR.
It appears that the seller's country (M) is taken as a reference when calculating taxes not only for country M but also for all other countries. In this example, I defined two countries and their different tax rates.
Tax for country M is 9%, and when I select it, then the system spits out "500 EUR (incl. 41,28 € tax)"
41,28 € is 9% of 500.
However, if during the checkout I select "country C" then the system spits out "555,05 € (incl 96,33 € tax".
The way THIS is calculated is by taking a non-tax amount from country M 458,72 EUR (500 - 41,28) and adding to it tax amount defined for country C (21 %).
458,72 EUR x 1,21 = 555 EUR.
(This does not make sense. The user changed the country during checkout process, but the system ignores it).
This way, what is defined as the package price, changes constantly (as example above instead of 500 EUR it shows 555 EUR as the total price)
The way it SHOULD be calculated based on my opinion is: when a user during the checkout selects country C the full amount defined for the entire package (500 EUR) and defined tax rate for the selected country (country C = 21 %) should be taken to calculate the tax amount.
I would expect the result: "500 € incl 86,77 € tax."
(86,77 is 21% of 413,22 EUR)
Question:
Why is WooCommerce not refreshing country during the checkout when a user selects a country different from store country?
How can I setup this functionality with WooCommerce?
Target functionality is to define membership packages for everyone independent of countries. And all users should see (and pay) the same price.
But when a user from country M goes through the checkout process then in reference to the total price the tax should be calculated. Same should work for any other country.

Finding Number of Customers Who Played at Least One Product Video

I am looking through the progression of pages users clicked on within one of our apps. Customers can go backwards in the process and each action has a time stamp. I want to find the percentage of customers who played a protection plan video at least once
ActivityType: page title (can visit the same page more than once)
Interested in "Products Presented" (Main protection plan page) and "Product Video Viewed"
ConsumerID: customers unique identifier
EventDateTime: Timestamp for each page visit
Is there a way to count CustomerId that played at least one video?
DistinctCustomersPlayedVideo =
CALCULATE(
DISTINCTCOUNT(ConsumerFunnelTime[ConsumerID],
COUNT(ConsumerFunnelTime[ActivityType] IN {"ProductVideoViewed"} >= 1))
)
I can then divide this by the number of distinct customers that made it to the protection page at least once
Data:
{
EventDateTime ActivityType ConsumerID ConsumerFunnel
22:48.0 Products Presented 4623439 1
22:50.0 Products Presented 4623439 2
26:15.0 Product Video Viewed 4623439 3
44:27.0 Products Presented 4673980 1
44:27.0 Products Presented 4673980 1
29:10.0 Products Presented 4674538 1
29:11.0 Products Presented 4674538 2
11:50.0 Products Presented 4674699 1
11:50.0 Products Presented 4674699 1
21:02.0 Products Presented 4674721 1
21:03.0 Products Presented 4674721 2
52:17.0 Products Presented 4674837 1
52:19.0 Products Presented 4674837 2
26:16.0 Products Presented 4674837 3
26:18.0 Products Presented 4674837 4
}
Try this measure:
DistinctCustomersPlayedVideo =
CALCULATE(
DISTINCTCOUNT(ConsumerFunnelTime[ConsumerID]),
ConsumerFunnelTime[ActivityType] = "Product Video Viewed"
)

Is google analytics new user affected by lookback window?

I recently found out that visitNumber in big query google analytics export starts over at 1 if a user has not visited the site in 183 days or more. I am now trying to understand if the same lookback window is applied when google analytics defines new users?
The result of SUM(totals.newVisits) in bigquery is exactly the same as the new user count reported in Google Analytics Audience report for a day in my exported data that has users marked as new visitors eventhough they have visited our site earlier. I therefore conclude that google analytics also uses the same lookback window.
I found that in order to count new users depending on their actual first visit (cookie creation date) it's possible to use the last part of the client id. As an example, this query finds the number of new users for 20181025:
#StandardSQL
SELECT SUM(CASE WHEN cookie_date = '2018-10-25' THEN 1 ELSE 0 END) AS new_visitors,
count(*) AS all_visitors
FROM (SELECT clientId,
DATE(TIMESTAMP_ADD("1970-01-01 00:00:00 UTC", INTERVAL min(CAST(REGEXP_EXTRACT(clientId, r'[0-9]*$') AS INT64)) SECOND), "Europe/Berlin") as
cookie_date
FROM `xxx.ga_sessions_20181025`
GROUP BY clientId)

Opencart - Product count next to each manufacturer for allowed products only

I am showing count of products next to each manufacturer. But the number is misleading because of it count all products, I mean allowed and disallowed product too. How to count and display only allowed products count next to manufacturer?
I am using OC 2.3.0.2.
vQmod Show Count Products of Manufacturers contain:
`(".$manufacturer['products_count'].")";`
On the brand page is for brand Montura counted 12 pieces.
brand montura 12 pcs
but in brand product list are showing just 11 pieces
brand montura 11 pcs

Pageviews per country per month in GA

I want to plot pageviews per country and per month in google analytics so I have a result like this:
Month / Country / Pageviews
October 2014 / Germany / 45.554
October 2014 / Russia / 32.435
...
November 2014 / Germany / 48.453
November 2014 / Russia / 33.786
...
I have tried this:
Audience -> Overview I have selected a long period and plot per month. Then I can get a country breakdown for that period but not per month.
Also it looks like I can only retrieve "Sessions" and not "pageviews" per country. Also in the detailed report, pageviews does not even show up.
So I tried this crazy workaround:
Behavior -> Site Content -> Content Drilldown
In the table below I have selected "country" in the 2nd dimension. Now I see each content drilldown per country and I also see the pageview. But I cannot group it per month. So I could now sort by countries, show all rows (a few thousend) and export via Excel to group countries together to have the pageviews per country in that period. I would have to repeat that for every month I want to look at -> lot of work.
Is there an easier solution to this?
Have you tried creating a custom report?
In your GA account, go to Customization, and then put in your metrics and dimensions.
Then click, Save.
You'll now have a custom report that you can email to yourself every month.

Resources