PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

IP Tracking Code

s2Member Plugin. A Membership plugin for WordPress®.

IP Tracking Code

Postby fcp2011 » April 25th, 2011, 12:53 am

Can admin explain how the following code works?:

This example uses cv1 to track a User's IP address:
( The IP address could be referenced using %%cv1%% )
custom="www.freeclassifiedproducts.com|<?php echo $_SERVER["REMOTE_ADDR"]; ?>"

I am trying to use gravity forms user registration plugin as my registration method. I use iDev to track sign ups via the 3rd party call. Gravity forms plugin does work with s2member but I need to pass the ip address.

Just trying to see if I can use the above code to do so.

Thanks,

Daniel
User avatar
fcp2011
Experienced User
Experienced User
 
Posts: 72
Joined: March 30, 2011

Re: IP Tracking Code

Postby fcp2011 » April 25th, 2011, 1:01 am

And if possible, tell me how this code works with the paypal pro form. If I can add this in to the gravity forms in the same place, that would rock.

Thanks again.
User avatar
fcp2011
Experienced User
Experienced User
 
Posts: 72
Joined: March 30, 2011

Re: IP Tracking Code

Postby Cristián Lávaque » April 25th, 2011, 1:46 am

Hi Daniel.

I don't understand what you're trying to do very well.

You want to use Gravity Forms for your registration page and then track that registration with iDev, so you need Gravity Forms to pass the IP data to the tracking API, is that it?
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: IP Tracking Code

Postby fcp2011 » April 25th, 2011, 8:01 am

for iDev to work the way I use it, the ip address has to be used. s2Member already has this built in via the cv1 variable. I was trying to find more about how this code worked and when it pings the user's computer.
User avatar
fcp2011
Experienced User
Experienced User
 
Posts: 72
Joined: March 30, 2011

Re: IP Tracking Code

Postby Cristián Lávaque » April 26th, 2011, 8:02 pm

Got it. OK, then add something like this in your form:

Code: Select all
<input type="hidden" name="custom" value="<?php echo $_SERVER['HTTP_HOST'], '|', $_SERVER['REMOTE_ADDR']; ?>" />
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: IP Tracking Code

Postby fcp2011 » April 26th, 2011, 10:03 pm

So, are you saying that I can use any form I want, as long as the one I use has a field named "custom" which contains the member's ip address?

Or, do I need to write some php code (more like have someone else write) that passes the client's ip address to a particular variable that s2member uses.
User avatar
fcp2011
Experienced User
Experienced User
 
Posts: 72
Joined: March 30, 2011

Re: IP Tracking Code

Postby Cristián Lávaque » April 26th, 2011, 10:32 pm

I don't know if any form, but I'm telling you how you could try passing the custom values: the domain name and the person's IP.
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: IP Tracking Code

Postby fcp2011 » April 26th, 2011, 10:57 pm

And where or what variable am I passing them to? Is it a s2Member thing or a wordpress thing that I am passing this info to?
User avatar
fcp2011
Experienced User
Experienced User
 
Posts: 72
Joined: March 30, 2011

Re: IP Tracking Code

Postby fcp2011 » April 27th, 2011, 5:20 pm

Ok, question here:

When I add the code above to my form, does it insert the url and ip address when the user hits the "submit" button or when the form is loaded during page load to the user's browser window?
User avatar
fcp2011
Experienced User
Experienced User
 
Posts: 72
Joined: March 30, 2011

Re: IP Tracking Code

Postby Cristián Lávaque » April 27th, 2011, 5:40 pm

It'll use the values of those variables when it creates the form, which will then be submitted with it. This custom field will let s2Member have the IP address in cv1 when you use the Tracking API for iDev integration.
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: IP Tracking Code

Postby fcp2011 » April 28th, 2011, 4:21 pm

Is this data added to the wordpress member table for that user? Can I just insert that data into the variable cv and cv1 when the page loads (vice when the form is submitted) in preperation for the user's registration?
User avatar
fcp2011
Experienced User
Experienced User
 
Posts: 72
Joined: March 30, 2011

Re: IP Tracking Code

Postby Cristián Lávaque » April 28th, 2011, 4:50 pm

I'm not sure it stores in the the usermeta.

Have you run some tests to see if you can do what you want? You'll get more familiar with it and have a better understanding.
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010


Return to s2Member Plugin

Who is online

Users browsing this forum: No registered users and 2 guests

cron