utm_tracker 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e6b0ea8d700180ef1c10d945b8580cabfd8aab4ed89316a5a914c59f3b4fd2fa
4
- data.tar.gz: 3a2e90a56046b068e2da798eb4a41693ee1e6b1b397543a4cea30f19a28de1bd
3
+ metadata.gz: e5d7acabb9e4cc8648be1953f001bf32736ed12806a48772155ed10f5743c399
4
+ data.tar.gz: 303f65379fb04273efcd991a40f5afaa4cf37e17a988df906c329b28b9971a93
5
5
  SHA512:
6
- metadata.gz: '09e1230eaaee7395fa4e8197814f7dc4d92286ff472e5cf52cb1cbb2f3cafa917fe276d3ab4d69e4636665ef4b8f352b8a7dbf0fc7e35ab5b192a7f20221a2b4'
7
- data.tar.gz: e12d148e3e1ef2de009dd8545c03ab6ac0b95b551c10487f54c264237d9e93cb51da255a48492a4dd27ccaeb21d87d2236a16acd4df181b6eac0190da28cad27
6
+ metadata.gz: 2d555985bbbe8034a8d44fe49f26ae2d99ad18063bdecfec8c8afb5c0a9766b6405059d7962aa70c5616d38e2e408f3eda2ff0b247fb4670cc57b1dbf4368b8f
7
+ data.tar.gz: 5b3ccf830b729ede46b63a16317cdde2b8886c481ae40155ab06430d244e5c6d4ebe9cd4c006a43b0008706b2c9ea351e910a4cdef1c441d68553430779a4045
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- utm_tracker (1.0.1)
4
+ utm_tracker (1.0.3)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -38,7 +38,9 @@ and then:
38
38
 
39
39
  2. Prepare link into user registration controller:
40
40
 
41
- `$ https://example.com?utm_data[source]=google&utm_data[medium]=cpc&utm_data[campaign]=testcampaign&utm_data[content]={adgroupid}&utm_data[term]={keyword}`
41
+ `$ https://example.com?utm_source=google&utm_medium=cpc&utm_campaign=testcampaign&utm_content={adgroupid}&utm_term={keyword}`
42
+
43
+ Important: gem can woek only with this utm tags!
42
44
 
43
45
  3. Add into ApplicationController next helper for save utm_tags into current_user session:
44
46
  ```ruby
@@ -54,11 +56,11 @@ before_action :get_utm_data
54
56
 
55
57
  Add this callback where you plan to receive advertising traffic.
56
58
 
57
- 5. Into user registration controller or after_sign_in_path_for method, add UtmTracker client current_user object and session[:utm_data], for_example:
59
+ 5. Into user registration controller or after_sign_in_path_for method, add UtmTracker client current_user object and session, for_example:
58
60
  ```ruby
59
61
  def after_sign_in_path_for(resource)
60
62
  generate_utm_tags
61
- something_path
63
+ something_path_for_redirecting # add your own path
62
64
  end
63
65
 
64
66
  def generate_utm_tags
@@ -5,7 +5,13 @@ module UtmTracker
5
5
  protected
6
6
 
7
7
  def get_utm_data
8
- session[:utm_data] ||= params[:utm_data]
8
+ session[:utm_data] ||= {
9
+ source: params[:utm_source],
10
+ medium: params[:utm_medium],
11
+ content: params[:utm_content],
12
+ campaign: params[:utm_campaign],
13
+ term: params[:utm_term],
14
+ }
9
15
  end
10
16
  end
11
17
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module UtmTracker
4
- VERSION = "1.0.2"
4
+ VERSION = "1.0.3"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: utm_tracker
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Levashov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-04-12 00:00:00.000000000 Z
11
+ date: 2023-01-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry