I want to implement a tracking pixel for inside an email.
The tracking pixel URL should look something like this:
http://example.com/__track.gif?id=XXXXXXX&u=XXXXX
Questions:
- How do I create a route specifically for that?
- while it says it’s .gif, I don’t actually want a gif file, as I want a rails controller to get called and be able to run a few methods when called, using the url params.
Thoughts?
Put the following in your routes.rb file:
Replacing
controller_name&action_namewith those appropriate.I recommend you read over the Rails Guide for routing, as
matchis noted in the very first section.