latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Aweber and custom signup fields

Home Forums Community Forum Aweber and custom signup fields

This topic contains 5 replies, has 2 voices. Last updated by  Raam Dev 4 years, 5 months ago.

Topic Author Topic
Posted: Wednesday Jul 11th, 2012 at 5:49 pm #18961

Please refer to:

http://www.s2member.com/forums/topic/aweber-integration-2/?qcAC=1#post-17408

Do yo have an actual example with aweber.com? Obviously the filter names will not have mail chimp but I tried a substitute of aweber for mailchimp and it does not seem to be working.

Here is my code:

add_filter(‘ws_plugin__s2member_aweber_merge_array’, ‘aweber_merge’, 10, 2);
function aweber_merge($merge, $vars)
{
$cfields = get_user_option(‘wp_s2member_custom_fields’, $vars[‘user_id’]);

return array_merge($merge, array(‘SCHOOL_CODE’ => $cfields[‘school_code’], ‘HIGH_SCHOOL_NAME’ => $cfields[‘high_school_name’]));
}

both high_school_name and school_code are valid unique ids for the custom registration fields

List Of Topic Replies

Viewing 5 replies - 1 through 5 (of 5 total)
Author Replies
Author Replies
Posted: Friday Jul 13th, 2012 at 1:05 am #19111
Raam Dev
Username: Raam
Staff Member

Hi Edward,

That filter does not exist within s2Member. Unlike MailChimp, AWeber’s API doesn’t support a merge array, so the same functionality isn’t possible. If you need to pass custom registration fields to your list server, I recommend using MailChimp.

Posted: Friday Jul 13th, 2012 at 8:30 am #19164

Aweber can take any field through the same email mechanism that you send the name and email address, its just a matter of putting the custom fields into the email on the s2member side and configuring the parser on aweber’s side. There is no way to do that? I was actually kind of surprised that that is not the default behavior.

Posted: Wednesday Jul 18th, 2012 at 11:06 pm #19711
Raam Dev
Username: Raam
Staff Member

Hi Edward,

Thank you for your patience on this. I’ve heard back from the lead developer and he confirmed that currently s2Member is using the email mechanism to integrate with Aweber. The next big release of s2Member will use Aweber’s API instead, which includes much better support for integration.

In the meantime, you can use the following hack to send the Custom Registration Fields in the email that’s sent to Aweber for new subscriptions:

Create this file and directory: /wp-content/mu-plugins/s2-hacks.php

<?php
add_filter('ws_plugin__s2member_aweber_msg', 'my_aweber_subscribe_command_via_email', 10, 2);
function my_aweber_subscribe_command_via_email($msg, $vars = array())
{
	$user_id = $vars&#91;'user_id'&#93;;
	
	$my_custom_field_value = get_user_field ('my_custom_field_id', $user_id);
	# A Unique Field ID you configured with s2Member.
	
	$msg .= "\n".'my_custom_field_id : '. $my_custom_field_value ;
	
	return $msg;
}
?>

The default email message that is sent to AWeber looks like this. So the hack above, is just appending additional details, which you may want to parse (i.e. via your AWeber Email Parser for s2Member inside your Aweber account):

s2Member w/ PayPal Email ID
Ad Tracking: www.example.com
EMail Address: johndoe22@example.com
Buyer: John Doe
Full Name:  John Doe 
First Name:  John
Last Name: Doe
IP Address: xxx.xxx.xxx.xxx
User ID: 1
Login: johndoe22
Role: s2member_level1
Level: 1
CCaps: music,videos
- end.
Posted: Wednesday Jul 18th, 2012 at 11:24 pm #19720

I will give that a try but right now my aweber seems to have stopped working completely. It was doing the default fields fine. I can test my parser in aweber with a sample message s2member sent me and it fires the rule and parses.

Are there certain email addresses that have to match addresses in aweber for the parser to work. It seems I read something like that somewhere, not sure if on your site or aweber but I can’t seen to find it.

When I try to send an email by hand to the passac-members@aweber.com it bounces back:

From:
Date: Wed, Jul 18, 2012 at 9:28 PM
Subject: failure notice
To: 1passac@gmail.com

Hi. This is the qmail-send program at mail1.aweber.com.
I’m afraid I wasn’t able to deliver your message to the following addresses.
This is a permanent error; I’ve given up. Sorry it didn’t work out.

:

— Below this line is a copy of the message.

Return-Path: <1passac@gmail.com>
Received: (qmail 30944 invoked by uid 1032); 18 Jul 2012 21:28:52 -0400
Received-SPF: pass (mail2.colo.lair: domain of 1passac@gmail.com designates 209.85.217.172 as permitted sender)
Received: from mail-lb0-f172.google.com (HELO mail-lb0-f172.google.com) (209.85.217.172)
by mail1.aweber.com (qpsmtpd/0.32) with ESMTP; Wed, 18 Jul 2012 21:28:52 -0400
Received: by lbbgo11 with SMTP id go11so2819025lbb.3
for ; Wed, 18 Jul 2012 18:28:50 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20120113;
h=mime-version:sender:date:x-google-sender-auth:message-id:subject
:from:to:content-type;
bh=wUhi7FcG148bMMoQSF4j1hH17g6eRVH7Py9haP6vJKw=;
b=Bc2k9Xr5iO9hIL0Pz7FLUHSSx10q+o6mBiVIgze7xA2+bZWr/Q/aQ5pX/zcd+7YhrQ
ibE1y99YUHn5Oz+2LbU4b3EoqQlTk0n/q/jtAf02f7nShDuvPwvo6ZvEFDRs8c59t3g6
c0WLaCaspW1x0jpO1ipM/Au2WgmCGk6jGIlBr+TXDa8SdHMSs5Q0LBbor0cfxTxDAZPW
i7IRIIoTkclelqEP6/7jGs3krlRuQ9czC/gBH+hqD3cpZ3Uq0IPFZm3OCjAjBpx5Kfk+
6RzLANlqdlsXk9ELyYSAe4D32CfgxljGOX0aYqt7yTCZeBI2L9PsYZiyvfTWWGVnCEvI
bMLQ==
MIME-Version: 1.0
Received: by 10.112.36.97 with SMTP id p1mr162121lbj.37.1342661330508; Wed, 18
Jul 2012 18:28:50 -0700 (PDT)
Sender: 1passac@gmail.com
Received: by 10.114.29.71 with HTTP; Wed, 18 Jul 2012 18:28:50 -0700 (PDT)
Date: Wed, 18 Jul 2012 21:28:50 -0400
X-Google-Sender-Auth: lf8s14VZgsRBdTLRp5qx0xuUCTw
Message-ID:
Subject: s2Member Subscription Request
From: Admin
To: passac-members@aweber.com
Content-Type: multipart/alternative; boundary=e0cb4efe2e40a89ccf04c524b3a6

–e0cb4efe2e40a89ccf04c524b3a6
Content-Type: text/plain; charset=ISO-8859-1

s2Member Subscription Request
s2Member w/ PayPal Email ID
Ad Tracking: s2Member-passac.net
EMail Address: edtest3000@netprospectors.biz
Buyer: Ed bennett
Full Name: Ed bennett
First Name: Ed
Last Name: bennett
IP Address: 96.25.177.67
User ID: 61
Login: edtest3000
Role: s2member_level2
Level: 2
CCaps:
– end.

–e0cb4efe2e40a89ccf04c524b3a6
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

s2Member Subscription Request
s2Member w/ PayPal Email ID
Ad Tracking: s2Member-passac.net=

EMail Address:=A0edtest3000@n=
etprospectors.biz

Buyer: Ed bennett
Full Name: Ed bennett
First Name: Ed
Last Name: bennett
IP Address: 96.25.177.67
User ID: 61
Login: edtest3000
Role: s2member_level2
Level: 2
CCaps:
=A0- end.

–e0cb4efe2e40a89ccf04c524b3a6–

Posted: Friday Jul 20th, 2012 at 2:46 am #19797
Raam Dev
Username: Raam
Staff Member

Hi Edward,

I’m not sure why the emails are bounding back from Aweber, but you may want to contact them to see if they can help you resolve that.

Viewing 5 replies - 1 through 5 (of 5 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.