Rails 正在删除 MailChimp 点击中谷歌跟踪的问号
当我使用 Mail Chimp 发送“注册”电子邮件时,电子邮件中的 URL 如下所示:
http://sample.com/?utm_source=blahblahblah
但是,当我单击链接时,会在新浏览器中打开一个页面,我会看到“?”消失然后我得到:
http://sample.com/utm_source=
这,导致 404 因为我的数据库中没有 utm_source 路由...
但是,如果我复制并粘贴第一个网址,我不会得到这种行为...
我只有这些我的routes.rb 中的三行:
root :to => "home#index"
match '/thanks' => "home#thanks"
match '/subs' => "subs#index"
When I send email for "sign up" with Mail Chimp, the url in the email looks like this:
http://sample.com/?utm_source=blahblahblah
However, when I click the link, a page opens in a new browser, I see the "?" disappear then I get:
http://sample.com/utm_source=
This, causes a 404 because I don't have a utm_source route in my db...
however, if I copy and paste the first url, i don't get this behavior...
I have only these three lines in my routes.rb:
root :to => "home#index"
match '/thanks' => "home#thanks"
match '/subs' => "subs#index"
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我发现这是因为我将我的网址列为“www.example.com”,它重定向到“example.com”......不知何故,重定向搞乱了事情,我所要做的就是将按钮的正确网址“example.com”
I found it it is because I had listed my url as "www.example.com" which redirects to "example.com" ... somehow, the redirect messes things up, all I had to do was correct url of the button to "example.com"
只需将
?utm
部分作为字符串添加到 URL 选项中即可。Just add the
?utm
part as a string in your URL options.