nystudio107 / instantanalytics

DEPRECATED Instant Analytics brings full Google Analytics support to your Twig templates and automatic Craft Commerce integration with Google Enhanced Ecommerce.
Other
101 stars 4 forks source link

eventTrack doesn't redirect if no filename #3

Closed phaetons closed 8 years ago

phaetons commented 8 years ago

I tried to eventTrack a link with an url. The adress /instantanalytics/eventTrack?url=http%253A%252F%252Fwww.demo.de&eventCategory=MyCategroy%2BTrackingUrl&eventAction=Click%2BLogo&eventLabel=Ad-Name&eventValue=someImpressions is called but didn't redirect to the given url.

It seems that the route is not working properly. I changed

'instantanalytics/eventTrack/(?P<filename>[-\w\.*]+)' => array('action' => 'instantAnalytics/trackEventUrl'),

to

'instantanalytics/eventTrack(/(?P<filename>[-\w\.*]+))?' => array('action' => 'instantAnalytics/trackEventUrl'),

so the trailing slash ist optional.

Beste regards Stephan

khalwat commented 8 years ago

Ah, good call @phaetons thank you. I will roll that in.