I am currently getting to know about Google Analytics 4 (GA4). It is said that the GA4 tracks the referral traffic using the http referrer field in the request header. If the referrer field is not present/empty in the header then GA4, relies on UTM params for identifying the souce/medium. If both the referrer and UTM params are not present then GA4 classifies the source of traffic as Direct. Now the doubt I have is, if both the http referrer and UTM params is present which one will the GA4 consider to generate the report in acquisition?
To be more clear, let us consider this scenario:
Let there be a website with domain mywebsite.com
Let x be a person who is scrolling down in linkedin.com. There he sees a post that has 3-4 lines of text and a hyperlink that redirects to https://mywebsite.com/?utm_source=linkedin&utm_medium=testsocialpost. He then click on that link. Let's say this is x's first time visiting the website.
So in this case, I will be having the http referrer=linkedin.com and utm_source=linkedin, utm_medium=testsocialpost
Q1) How the report is generated in GA4 in the Reports -> Lifecycle -> Acquisition in the table if I choose First user source/medium dimension.Below is the Sample screenshot of the table for another website.
Will the report table be something like this:
| FirstUser source/medium | New users |
| ----------------------- | --------- |
| linkedin.com/referral | 1 |
(or something like this below)
| FirstUser source/medium | New users |
| ----------------------- | --------- |
| linkedin/testsocialpost | 1 |
Q2) If there are 2 different users visiting mywebsite.com redirected from 2 different linked in post in which 1 post has utm params and other does not have utm params. Then the generated report table will be like something below?
| FirstUser source/medium | New users |
| ----------------------- | --------- |
| linkedin.com/referral | 1 |
| linkedin/testsocialpost | 1 |
Will this be the generated report or something else.
References:
https://cxl.com/blog/utm-parameters/
UTM parameters have a higher priority, so in Q1 you will see linkedin/testsocialpost in report. In Q2 you are right.
Related
I am using Google analytics data source and my goal is to make a conversion funnel showing the percentage of users that has reached each page, using as the denominator the users of the initial page of the process.
Example:
PAGE | Users | Conversion |
page1 | 1.000 | 100% |
page2 | 800 | 80% |
page3 | 700 | 70% |
page4 | 20 | 20% |
I can get it by working the data before in a Google spreadsheet but I need to do it directly from google analytics to use the date filter.
Is it possible to achieve my objective?
Please help!
Currently not possible in GDS with the direct GA connector. Hopefully something they will update soon!
Our website automatically detects a user's region. Though the site structure remains the same across all regions, the content on the page can vary.
As such, URLs are fomatted as so: http://website.com/XX/pagename with XX=country code (e.g. GB, US, IT, etc.)
On Google Analytics, I want to see all of the different country versions of a single page contained as a single result.
For example, if I look at our top pages for January, I see:
| URL | page views |
|-------------------------|------------|
| website.com/US/page1 | 100 |
| website.com/GB/homepage | 60 |
| website.com/US/homepage | 40 |
| website.com/GB/page1 | 20 |
But what I want to see is:
| URL | page views |
|----------------------|------------|
| website.com/page1 | 120 |
| website.com/homepage | 100 |
Wherein the same URL (ignoring country code) is concatenated into one figure.
Is such a thing possible?
My end game here is a desire to see what our most popular pages are across the site in total, regardless of which country the user is browsing from.
Thanks!
One option is to use an advanced filter in GA so that you take something like website.com/US/page1 and replace it with website.com/page1. This only works on data moving forward from when the filter is applied, and does not change historical data, and cannot be undone once applied. This is another reason why it's always a good idea to have a Raw view which is unfiltered.
For the Advanced Filter, you need to do something like this:
where it looks for the pattern /{any two letters}/{anything else} and outputs just the /{anything else} part.
I am trying to determine how to pass through a mandatory parameter required to follow a defined route within my Behat features file.
This is my scenario:
Scenario: I should be able to create a cars asset
Given I am on the ayrshireminis_cars_asset_create page
When I submit a "ayrshireminis.cars.asset.type" form with values:
| name | type | position | active |
| Cars Info Doc | PDF | 1 | 1 |
Then The form should be valid
and this is the error:
Given I am on the ayrshireminis_cars_asset_create page
Some mandatory parameters are missing ("categoryId") to generate a URL for route "ayrshireminis_cars_asset_create".
(Symfony\Component\Routing\Exception\MissingMandatoryParametersException)
It's clear why I get this error as my routing is configured like this:
ayrshireminis_cars_asset_create:
pattern: /category/{categoryId}/asset/new/
How can I pass through a categoryId?
I found that I was looking at this from the wrong angle, this is how I constructed the test scenario in the end up:
Scenario: Submitting a valid cars asset form
When I submit a "ayrshireminis.cars.cars_asset.type" form with values:
| name | type | position | active |
| Cars Info Doc | pdf | 1 | 1 |
Then the form should be valid
And the cars entity form entity should have the following values
| name | type | position | active |
| Cars Info Doc | pdf | 1 | 1 |
And the cars entity form entity should be persisted correctly
On our eCommerce site, the job of the category page is to move the customer on to the product page. Then the job of the product page is to get the user to add a product to their basket.
I have set up an Add To Basket event, which is working nicely, but I am stuck with how to analyse the category page.
We have hundreds of products so all of the URL's are different.
Ideally, Id like to be able to produce a table like this.
|______CATEGORY_PAGE_______|__PROCEEDED_TO_PRODUCT_PAGE_|
| /womens/dresses | 34% |
| /womens/jewellery | 39% |
| /mens/jackets | 28% |
_________________________________________________________
I am tracking visits to the category pagetype and product pagetype as a custom variable but I just don't know how to report on it.
I'm new to Drupal and am trying to embed a Flash game in the middle of the front page. I've created a "Full HTML" text format in Home >> Administration >> Configuration >> Content authoring and I've created a new block using that format by going into Home >> Administration >> Structure >> Blocks and placed it into Content region and display it at the <front> page only:
My problem is that I need to pass the user id and also a custom gender field to the swf file through the FlashVars parameter.
I can see my gender field in the database (I use PostgreSQL 8.4.7/CentOS 5.5/PHP 5.3):
# select * from field_data_field_gender;
entity_type | bundle | deleted | entity_id | revision_id | language | delta | field_gender_value
-------------+--------+---------+-----------+-------------+----------+-------+--------------------
user | user | 0 | 6 | 6 | und | 0 | Male
user | user | 0 | 5 | 5 | und | 0 | Male
user | user | 0 | 1 | 1 | und | 0 | Male
user | user | 0 | 7 | 7 | und | 0 | Female
And I see the users table:
# select uid, name from users;
uid | name
-----+-------
5 | Vasja
6 | Vanja
1 | Alex
0 |
7 | Petja
But how could I print them into my custom content block?
I also suppose there is already some prefilled data structure there, something like a $user array?
Please give me a bit help and directions to get me running on custom blocks.
I'm looking at the docs, but they're talking about custom modules, which is probably a bit overkill in my case?
And also I need to print a message to the Anonymous user telling him or her to sign in or register. Please give me a pointer here
Thank you!
Alex
P.S. My understanding is that swfobject isn't working well with Drupal 7 yet, but that is not a big issue for me.
It sounds like you want to be able to execute PHP code in your block's content. The Full HTML filter mode is not sufficient for that. Take a look at the PHP Filter module. It's included in core, but needs to be activated first, before you can use it for your block.
After that you can use normal PHP code, at which point the documentation on custom modules applies. You could for example access the $user array to retrieve fields, or make direct db calls, depending on where your required information is.
Edit: Of course, having full PHP access is powerful and should only be allowed for administrators. Hence, make a new specific content type in which you allow the PHP filter and ensure in the permissions that no user other than an administrator can create or edit that content type.