AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

Analytics
2.6K members online now
2.6K members online now
Learn how to set up goals and Ecommerce tracking, verify accuracy of attribution traffic sources, and discuss funnel visualization, Multi-Channel Funnels, the Goal Flow Report, and Enhanced Ecommerce
 
Guide Me
star_border
Reply

How to setup goals for partially changing url

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

I want to setup goals for http://www.xyz.com/success.php?order=MzM3NzU= 

 

The character which we have after order = changes every time. How do i setup goal for this.

 

Example:

 

For first order the url would be: http://www.xyz.com/success.php?order=MzM3NzU=

 

For the second order the url would be: http://xyz.com/success.php?order=MzM4NDc=

 

likewise....

 

I went to goal > selected place an order option > selected regular expression and entered /success.php?order=

 

But i m not sure this is the right way. Please help me to setup goals so that I can track my goals (how many people placed an order successfully).

Re: How to setup goals for partially changing url

Follower ✭ ✭ ✭
# 2
Follower ✭ ✭ ✭
HI Eknoll,

I assume that you have not attached your hostname to the Request URI.

Then you can accomplish this by using a Regex:
^/success\.php\?order=

You can check this Regex in your content reports to find out whether it matches with all goal URLs.

Best,
Paul

Re: How to setup goals for partially changing url

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭
Hi Paul,

Thank you for your response.

I have replaced regex with exactly what you sent ...... ^/success\.php\?order=

Hope this will work. I will let you know.

Thank you very much

Re: How to setup goals for partially changing url

Follower ✭ ✭ ✭
# 4
Follower ✭ ✭ ✭
Hi Eknoll,

I think it should work. Just let me know!

And like I mentioned you can already check it in your content reports, whether this regular expression works the way it should. It should match with your goal URLs.

Thanks,
Paul

Re: How to setup goals for partially changing url

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭
Hi Paul,

I m not sure what you mean by content reports. Are you talking about Behaviour > Site content > All pages.

I see like below pages under sitecontent > all pages,
success.php?order=MzE4MzY=
/success.php?order=MzIxNTU=

I have mentioned the same in my query as well.

I still see 0 goals under conversion > goals > overview. But we got orders today. I m not sure whether it works.

I have implemented this code 5 hours before.

Regards,

Re: How to setup goals for partially changing url

[ Edited ]
Follower ✭ ✭ ✭
# 6
Follower ✭ ✭ ✭

Hi Eknoll,

Ok, I can see there are other issues with the configuration since both success as well as /success are popping up.
It's hard to explain it from here since I can't access the data. That would make it a lot easier and quicker to solve.

Let's make it easier:
- Please navigate to Behaviour > Site content > All pages
- Type in success\.php\?order
- Does it show you all confirmation URLs (you can select the last 30 days if you like)? Without other non-confirmation page URLs?

If you can see a good match, you should add this regex to your goal setup and it should work.
I am confident about that. :-)

 

Btw, here is one of my popular guides that might be a great help for you to learn Regex: http://online-metrics.com/regular-expressions/

Paul

Re: How to setup goals for partially changing url

Visitor ✭ ✭ ✭
# 7
Visitor ✭ ✭ ✭
Hi Paul,

Thank you for your response. Sorry, that was a typing mistake. All my order confirmation url with /success only.

This is my order confirmation URL /success.php?order=MzIxNTU= but your asking me to search with success\.php\?order. i m not sure why are you using opposite slash and inbetween the slash between each word. Please let me know.

I have searched with success\.php\?order as per your email and I got all confirmation url only. I have not got any non confirmation url.

sample results:

/success.php?order=MzM3OTQ=
/success.php?order=MzEyNjY=
/success.php?order=MzE2Mzc=

etc etc....

Regards,

Re: How to setup goals for partially changing url

Follower ✭ ✭ ✭
# 8
Follower ✭ ✭ ✭
Hi Eknoll,

Ok, great. Then you can use: /success\.php\?order

I use the backslash to "escape" the dot (.) and question mark (.). Those are regular expression characters by nature.
By using the backslash I make Google Analytics read them as normal characters.

Regex meaning:
Dot (.) is any character.
Question mark (?) is match last character 0 or 1 time. It makes the last character optional.

So this is your solution:
/success\.php\?order

Have a nice day!
Paul

Re: How to setup goals for partially changing url

Visitor ✭ ✭ ✭
# 9
Visitor ✭ ✭ ✭
Hi Paul,

Thanks for the info

Good news! goals working. I see 63 goals in last 2 days. It looks okay now Smiley Happy

I would like to track visitors and goals details which we are getting through our email newsletter. Can you please help me to do this setup.

Regards,

Re: How to setup goals for partially changing url

Follower ✭ ✭ ✭
# 10
Follower ✭ ✭ ✭
Hi Eknoll,

Good to hear it works the way it should. :-)

About your other query, it might be more easy to post a new topic.

But, in short, you need Google Analytics to recognize these visitors as email newsletters visitors. If that works correctly, your Google Analytics goals will follow.

- Make sure to tag all the destinational URLs to your website (from email newsletter) with UTM tags. Fill in at least campaign name, campaign medium and campaign source.
https://support.google.com/analytics/answer/1033867?hl=en
https://chrome.google.com/webstore/detail/google-analytics-url-buil/gaidpiakchgkapdgbnoglpnbccdepnpk...

After you have set this up, it should work correctly. You can use real-time reports to check whether it works the way you want.

Best,
Paul