Zen Cart Logo
Forums / General Questions / URL Parameters Break Links

URL Parameters Break Links

Views: 2,686

Results 1 to 10 of 10
27 Mar 2019, 12:29 PM
#1
lindasdd avatar

lindasdd

Zen Follower

Join Date:
Jun 2007
Posts:
474
Plugin Contributions:
0

URL Parameters Break Links

Is there a trick to getting URL Parameter links to work with category and manufacturer pages? Or rather, is it normal that URL Parameters break links?

My sites that rewrite URL's to be static work fine with URL Parameters.

My sites without URL rewriters cause links with URL parameters to lead to pages that display 'There are no products to list in this category.'

Product links seem to be ok.

27 Mar 2019, 1:09 PM
#2
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,081
Plugin Contributions:
56

Re: URL Parameters Break Links

A link to one of the site's displaying this behavior?

27 Mar 2019, 1:59 PM
#3
lindasdd avatar

lindasdd

Zen Follower

Join Date:
Jun 2007
Posts:
474
Plugin Contributions:
0

Re: URL Parameters Break Links

27 Mar 2019, 2:10 PM
#4
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,081
Plugin Contributions:
56

Re: URL Parameters Break Links

What plugin is injecting those utm_* variables?

27 Mar 2019, 2:24 PM
#5
mprough avatar

mprough

Totally Zenned

Join Date:
Nov 2007
Location:
Woodbine, Georgia, United States
Posts:
4,284
Plugin Contributions:
38

Re: URL Parameters Break Links

The best way is a redirect. Is it all manufacturers pages being tagged or just some?

~Melanie

27 Mar 2019, 3:20 PM
#6
lindasdd avatar

lindasdd

Zen Follower

Join Date:
Jun 2007
Posts:
474
Plugin Contributions:
0

Re: URL Parameters Break Links

It isn't a plugin. It is basic Google UTM Parameters. They can't be hard coded into a redirect because they change all the time based on different marketing.

27 Mar 2019, 5:12 PM
#8
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,690
Plugin Contributions:
56

Re: URL Parameters Break Links

You could just remove the utm_* stuff by modifying init_includes/init_canonical.php (put it in init_includes/overrides/init_canonical.php). Add these parms to the $excludeParams array.

27 Mar 2019, 5:48 PM
#9
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: URL Parameters Break Links

swguy:

You could just remove the utm_* stuff by modifying init_includes/init_canonical.php (put it in init_includes/overrides/init_canonical.php). Add these parms to the $excludeParams array.
Or could use an observer off of:

$zco_notifier->notify ('NOTIFY_INIT_CANONICAL_PARAM_WHITELIST', $current_page, $excludeParams, $keepableParams, $includeCPath);

And update $excludeParams to accomplish the same without the override.

27 Mar 2019, 6:16 PM
#10
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,081
Plugin Contributions:
56

Re: URL Parameters Break Links

lindasdd:

Think I figured it out. Because there is already a Query in the link (?) you need to start the UTM section with an & instead of a ?. For example:
https://www.lindasdietdelites.com/index.php?main_page=index&manufacturers_id=376&utm_source=Funnel1&utm_medium=email&utm_campaign=032719emailtolist
Yes, that should correct the issue.