user2312578
user2312578

Reputation:

How to filter by query string in Google Analytics?

This is a question about Google Analytics state 06/2016.

We run a site and have decided to try out Facebook Ads. Now in Facebook ads we have defined a custom parameter src=fb.

I'd like to create a custom Analytics report that shows

and then which pages they viewed and if they clicked on Adsense ads and the usual Adsense statistics like cpc, rpm.

How do I create a filter for this src=fb query string so I can follow what they did on the target site?

Please be detailed, a "create a custom filter" doesn't cut it. How, where, what content? The target uri is /?src=fb.

Edit: More clear information

There is a target site: example.com

There is a Ad campaign. To know that people came to the target site using this Ad campaign there is a parameter src=fb e.g. https://example.com/?src=fb

Because we know the parameter we could filter visitors who landed on the target site through the ad campaign.

GET /?src=fb HTTP/1.1
Host: example.com

This way we know people who clicked the ad came from the campaign.

People who did not click the ad visited the site from other sources. They don't matter in this context.

Now as the first step I'd like to display everyone who visited the site using /?src=fb uri. I could grep server logs but I wouldn't know if they clicked ads on the target site.

Upvotes: 12

Views: 19389

Answers (1)

samthebrand
samthebrand

Reputation: 3090

First, you should probably be using UTM parameters for offsite campaigns. Google Analytics automatically pulls UTM campaigns into standard campaign reports so you'd have to do only minimal sorting and filtering to analyze your Facebook ad performance.

But since you used a custom query string instead of UTMs you'll probably have to create a Custom Segment: Advanced > Conditions, and Include only Users (or Sessions, up to you) who hit a Landing Page that contains 'src=fb'. Like so:

Google Analytics Advanced Segment

Save that segment and view your reports through it and as long as your property is configured properly (you may have to define goals), you should see how your users behaved after hitting the ad.

Upvotes: 17

Related Questions