Wildcard in Google Analytics Conversion Funnel - google-analytics

I'm trying to track, how many times our dealer search has been executed. The results page's URL is the following: "https://www.company.de/dealer/?dealer=" + dealer.id
Is there any way that I could use a wildcard for the dealer id, so that every load of the results page is getting recorded as a conversion?
Many thanks
Max

Related

Google analytics API: different sum of sessions with 'ga:eventLabel' function and without it

I added 'ga:eventLabel' function to my script and sum of sessions decreased from 2238 to 994. Why?
I expect the same result from both script
dim=['ga:eventLabel', 'ga:source','ga:sourceMedium']
met=['ga:sessions', 'ga:users']
start_date='2019-07-01'
end_date='2019-07-03'
transaction_type='Goal'
goal_number=''
refresh_token=token
condition=''
data_2=google_analytics_reporting_api_data_extraction(viewID,dim,met,start_date,end_date,refresh_token,transaction_type,goal_number,condition)
viewID='*********'
dim=['ga:source','ga:sourceMedium']
met=['ga:sessions', 'ga:users']
start_date='2019-07-01'
end_date='2019-07-03'
transaction_type='Goal'
goal_number=''
refresh_token=token
condition=''
data=google_analytics_reporting_api_data_extraction(viewID,dim,met,start_date,end_date, refresh_token,transaction_type, goal_number,condition)```
Here are the results:
--
The two queries have two different meanings, and won't give you the same result, unless you have a data set, where all sessions have at least one event type hit associated with them.
The first query says: count all my users and sessions for the given date range, breaking it down by event label, source, source/medium and date. So in this case, you implicitly filter for any known event labels, where (not set) is an empty, but existing label for a recorded event. Sessions without any events are excluded.
The second query says: count all my users and sessions for the given date range, breaking it down by source, source/medium and date (regardless, if they had any events).
You can verify this behavior, if you create these custom reports in Google Analytics web UI. It is similar to querying custom dimensions: if no value was set for a given custom dimension, those records are excluded.

PageName segment in Adobe Analytics

I'm trying to create a segment based on this case:
"I have an event that is triggered in multriple pages and I only want to see the number of times it has been fired on a specific page."
I have created a segment where the condition is:
Page name (URL without domain) -> contains -> 'news/potatoe'
The problem with this is that when I cross this segment against the event, the results are wrong, I get very few hits even though I know, for sure, that the number of hits should be higher.
Adding on, when I breakdown a dimension by "Page name (URL without domain)", I don't get the total ocurrences.
Thank you in advance!
The pageName variable is kind of an outlier when it comes to event attribution. Instead of giving full credit to the page it fired on, it uses linear allocation, which divides credit equally among all pages seen in the visit. More info on linear allocation can be seen here:
https://marketing.adobe.com/resources/help/en_US/reference/allocate.html
In order to get the data you're looking for, you will want to use an eVar and not pageName. Using a processing rule to copy pageName into an eVar would be the easiest way to accomplish that.
In short, you're pulling the report right with the exception that pageName has weird attribution. If you replaced pageName with an eVar containing pageName data, you'd get the report you're looking for.

Tracking and grouping parameter based Goal Destination URL in Google Analytics

I have a reservation.php page and on success, the page returns/post a 5 digit Confirmation No. as part of the URL. e.g. /reservation.php?Success=&ConfirmationNo=29564
In Google Analytics > Admin > Goals Detail > Destination URL, I have set the type "Begins with" and set the URL to /reservation.php?Success=&ConfirmationNo= But in Reporting > Conversions > Goals > Overview, it do not group (Goal Completion Location) all reservations into one goal URL instead showing each reservation URL separately. e.g.
Goal Completion Location:
/reservation.php?Success=&ConfirmationNo=29566
/reservation.php?Success=&ConfirmationNo=29567
/reservation.php?Success=&ConfirmationNo=29568
So I unable to compare the number of reservations with the previous month. I want it to show something like /reservation.php?Success=&ConfirmationNo= as one location with number of reservations in a period selected.
I tried to add . or * or .* at the end of URL and selected both "Begins with" and regular expression to group all the reservations but "Verify this goal" tool do not accept any of these and shows 0% completion in last 7 days.
Can you please help how can I group all my reservations into 1 Goal Completion Location?
Well Google Analytics does exactly what you told it to do. There are two different things:
Goal - a goal is triggered when the URL starts with /reservation.php?Success=&ConfirmationNo=
Goal completion location - simply shows the actual location where the goal happened
If you want to compare goals by month, go to Conversions -> Goals -> Overview. At the top left, choose name of your target in the dropdown menu (below segments). At the top right, choose grouping by month. At the very top right, choose the time period for which you want to compare data (at least two months).
Now you will see the chart of number of goals per each month in the specified time period.
If you are still unhappy with this reporting, then pass the variable ConfirmationNo in the $_POST field instead of the $_GET field.

Counting session from each page from the data exported to bigquery from google analytics

I have been trying to count the session for each page using bigquery where data is exported to bigquery from GA. The schema of the data can be found here.
I have tried following query
SELECT
hits.page.pagePath AS page,
COUNT(totals.visits) AS sessions
FROM
[xxxxxxx.ga_sessions_20160801]
WHERE
REGEXP_MATCH(hits.page.pagePath, r'(orderComplete|checkout)')
AND hits.type = 'PAGE'
GROUP BY
page
ORDER BY
sessions DESC
I compared the result of the query with numbers that I get from the GA but the result is quite different. I expected that above query would give total session for each page but it gives total pageviews for each page. In other words result of above query exactly match with pageviews of each page instead of sessions of each page.
I also tried the following query
SELECT
hits.page.pagePath AS page,
COUNT(hits.isEntrance) AS sessions
FROM
[xxxxxxx.ga_sessions_20160801]
WHERE
REGEXP_MATCH(hits.page.pagePath, r'(orderComplete|checkout)')
AND hits.type = 'PAGE'
GROUP BY
page
ORDER BY
sessions DESC
The result this time is very close to actual but not exactly the same as numbers that I am getting from GA. This time bigquery result is slightly less than that of the GA for some pages.
There is no sampling in GA in my case otherwise result is acceptable because error is between 0.5% to 4%
I am working with raw data without any filter on GA profile and same data is exported to bigquery.
Question: How is session counted when we count session by pages?
When I don't group the result by hits.page.pagePath there is no mismatch of results that I get from GA and that from bigquery
Instead of using COUNT(totals.visits), what if you use COUNT(1)? The results of COUNT will vary depending on whether you are using a repeated field. Possibly relevant question with some in depth answers: BigQuery flattens when using field with same name as repeated field
As an aside, standard SQL (uncheck "Use Legacy SQL" under "Show Options") has less surprising semantics around counting, although it would require you to be more explicit with operations on arrays in this case.
To count sessions, I use COUNT(visitId) instead of COUNT(totals.visits). This seems to give me numbers identical--or very, very close--to what I see in GA.

BigQuery for Google Analytics Export combining ANDs and ORs for visits with specific hits.page.pagePath doesn't work

I am trying to get the figures related to search performance based on goal completions in Google Analytics.This goals are based on urls, so as a first step what I did was getting the total completions adding as many ORs as goal urls we have and that's fine. So far so good.
The problem is when we have to segment it by "visits with search". Based on url as well: pagepath like "%search_parameter%" but this time in a separate statement as the previous goal urls:
SELECT sum(totals.visits)
FROM [XXXXXX.ga_sessions_20150101]
WHERE
(
REGEXP_MATCH (hits.page.pagePath,r'/goal1/')
or REGEXP_MATCH (hits.page.pagePath,r'/goal2/')
or REGEXP_MATCH (hits.page.pagePath,r'/goal3/')
or REGEXP_MATCH (hits.page.pagePath,r'/goal4/')
)
and REGEXP_MATCH (hits.page.pagePath,r'/search/')
In Google Analytics interface of course I have goals completed from people doing searches, so I don't understand what may have been missing when constructing this query.
Any help?
Many Thanks!
If I correctly understood that "visits with search" mean that at least one url in hits.page.pagePath matches '/search/', then I think the following should work for you:
SELECT sum(totals.visits)
FROM
(SELECT
totals.visits,
hits.page.PagePath,
SOME(REGEXP_MATCH(hits.page.pagePath,r'/search/'))
WITHIN RECORD AS has_search
FROM [XXXXXX.ga_sessions_20150101]
WHERE REGEXP_MATCH(hits.page.pagePath,r'[/goal1/|/goal2/|/goal3/|/goal4/]')
)
WHERE has_search

Resources