IT Blog

  • Blog
  • Technology
    • Technology
    • Architecture
    • CMS
    • CRM
    • Web
    • DotNET
    • Python
    • Database
    • BI
    • Program Language
  • Users
    • Login
    • Register
    • Forgot Password?
  • ENEN
    • 中文中文
    • ENEN
Experience IT
In a World of Technology, People Make the Difference.
  1. Home
  2. Technology
  3. Web
  4. Tracking referral ID for registered user in WordPress

Tracking referral ID for registered user in WordPress

2019-06-18 4893 Views 0 Like 0 Comments

Very often, user referred others for registration for some purpose. How to track these information in WordPress.

Here's one solution.

Table of Contents

  • Plugins
  • Steps
    • 1. create a form (testme in this case) with hidden field. Get the Field Key value.
    • 2. add script on Script n Styles:
  • Test
  • Result

Plugins

  • Formidable
  • Scripts n Styles

Steps

1. create a form (testme in this case) with hidden field. Get the Field Key value.

testme-form

2. add script on Script n Styles:

header:

$ = jQuery;
$.urlParam = function (name) {
    var results = new RegExp('[\?&]' + name + '=([^&#]*)').exec(window.location.search);
    return (results !== null) ? results[1] || 0 : false;
}

footer:

$(document).ready(function(){
	$("#field_5zpwa").val($.urlParam('ref'));  // 5zpwa is the Field Key value for the hidden field
});

script-on-page

Test

https://fucan.org/testme?ref=tony1

testme-form-page

Result

result

Loading

error
fb-share-icon
Tweet
fb-share-icon
IT Team
Author: IT Team

Tags: Blog
Last updated:2021-01-03

IT Team

This person is lazy and left nothing

Like
< Previous
Next >

Comments

Cancel reply
Newest Hotspots Random
Newest Hotspots Random
Rich editor not working Making web page scroll down automatically Getting data from Dapper result All Unicode Chars How to keep and display contact form 7 data Common Regular Expressions
Power BI First Taste The events calendar - event title location Duplicator - backup & restore Fixing Kratos theme multi-language issue Change contact form 7 field display size Customize theme CityZen
Categories
  • Architecture
  • BI
  • C#
  • CSS
  • Database
  • DotNET
  • Hosting
  • HTML
  • JavaScript
  • PHP
  • Program Language
  • Python
  • Security
  • SEO
  • Technology
  • Web
  • Wordpress

COPYRIGHT © 2021 Hostlike IT Blog. All rights reserved.

This site is supported by Hostlike.com