Skip to content

Commit

Permalink
Merge pull request #104 from ConvertKit/issue/102
Browse files Browse the repository at this point in the history
Fix subscriber id cookie.
  • Loading branch information
growdev authored May 9, 2018
2 parents acc9ef6 + ae41613 commit 2536f9a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
7 changes: 5 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Contributors: nathanbarry, growdev
Donate link: https://convertkit.com
Tags: email, marketing, embed form, convertkit, capture
Requires at least: 3.6
Tested up to: 4.9.4
Stable tag: 1.5.3
Tested up to: 4.9.5
Stable tag: 1.5.4
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -46,6 +46,9 @@ Yes, for it to work you must first have an account on ConvertKit.com

== Changelog ==

### 1.5.4 2018-05-19
* Fix for adding ck_subscriber_id to cookie

### 1.5.3 2018-03-08
* Added a default form setting for post categories
* Clean up logging
Expand Down
8 changes: 5 additions & 3 deletions resources/frontend/wp-convertkit.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
jQuery(document).ready(function($) {

// Manage visit cookie
var user = $.cookie( 'ck_visit' );
var subscriber_id = $.cookie( 'ck_subscriber_id' );
// Add ck_subscriber_id to cookie
subscriber_id = ckGetQueryVariable('ck_subscriber_id');
if ( 0 < subscriber_id ) {
$.cookie('ck_subscriber_id', subscriber_id, {expires: 365, path: '/'});
}

/**
* This function will check for the `ck_subscriber_id` query parameter
Expand Down
2 changes: 1 addition & 1 deletion wp-convertkit.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: ConvertKit
* Plugin URI: https://convertkit.com/
* Description: Quickly and easily integrate ConvertKit forms into your site.
* Version: 1.5.3
* Version: 1.5.4
* Author: ConvertKit
* Author URI: https://convertkit.com/
* Text Domain: convertkit
Expand Down

0 comments on commit 2536f9a

Please sign in to comment.