🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

persist_campaign

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

persist_campaign

bundlerRubygems
Version
0.0.3
Version published
Maintainers
1
Created
Source

PersistCampaign

Build Status

Persist campaign parameters - such as utm_campaign, utm_source, etc - on Rails redirect_to.

Installation

Add this line to your application's Gemfile:

gem 'persist_campaign'

And then execute:

$ bundle

Default persisted keys

  • utm_campaign
  • utm_source
  • utm_medium
  • utm_content
  • utm_term
  • gclid (for Google Adwords)

Configure additional keys

You can append to the key array in a configuration block. There is an install generator to create the initializer file.

rails g persist_campaign:install

Edit the initializer to append other keys:

PersistCampaign.configure do |config|
  config.keys += ['foo']
end

Testing

rake

Credits

Thanks to ndp's save-the-campaign gem for providing the solution to patching Rail's redirect_to implemention. His solution is reproduced here under the MIT license.

Contributing

  • Fork it ( http://github.com/mubi/persist_campaign/fork )
  • Create your feature branch (git checkout -b my-new-feature)
  • Commit your changes (git commit -am 'Add some feature')
  • Push to the branch (git push origin my-new-feature)
  • Create new Pull Request

FAQs

Package last updated on 24 Jul 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts