Using RightMessage to smartly determine the affiliate ID to set
21views
Using RightMessage to smartly determine the affiliate ID to set
·Nov 10, 2025
Transcript
00:01
Yeah, so I thought I'd hit record, no script, no real plan, and just show you something I just rolled out, which I'm really impressed with.
00:08
And I think this just goes to show how powerful Write message is when you really push it to its limits.
00:15
so here's the use case and again I'd love to hear what you think of how this all works.
00:22
Use cases.
00:22
We're doing a bunch of partner webinars.
00:24
The next one coming up is one with Justin Welsh.
00:27
And the idea is for each partner we set up a custom landing page.
00:31
They send their list to this page and then anyone who opts in and registers gets the their affiliate ID attached to their contact record in our email platform.
00:43
So the benefit of doing it that way is that if and when something somebody does buy, whether it's a month from now, six months from now, a year from now, they still get the credit, the partner still gets the credit.
00:55
Which in my mind is superior to the cookie based approach where if they're on a different device or different browser or clear their cookies or whatever else, all that attribution is lost.
01:05
So the way we had done this previously.
01:08
Let me just skip ahead to the forum is we're using Write Message to handle the registration form for the webinar.
01:16
And what we have going on is we have a hidden field in the Write Message form that populates a custom field called affiliate ID.
01:25
And previously this was populating it with a JavaScript variable that's on the page.
01:30
So when I, when we build these landing pages, part of the process is populating in a hit in a custom field on the CMS side, the Partner id.
01:41
So the affiliate ID from in this case, First Promoter, which is the tool we use.
01:45
So people go to the page and then when they opt in through Write Message, it would pull from the page a certain JavaScript variable and then send it up to be the affiliate id.
01:57
And that's fine and that that's how we want it to work.
02:01
But here's the problem.
02:03
So I want to promote this event to, to my own email lists because this is going to be a really badass event.
02:10
we're going to talk about how Justin used our tool to make a lot of money so it makes sense not to just expose us to his list, but also mine.
02:18
Now while I love our partners, I don't feel it's correct to give them affiliate revenue for our own traffic that we send.
02:27
So how do we fix this?
02:30
Well, the good news is I was Able to fix this entirely with no code within Write Message and I'd like to show you what I did.
02:37
So what I've done is I used a new feature we have in Write Messages flows called variables.
02:42
So variable.
02:43
Think of it as just a temporary thing that you can use to make decisions around and then do stuff with.
02:50
So what I've done up here is when the page loads before the form is shown, we're setting a variable called affiliate and the value of that is going to be the RM affiliate ID, JavaScript variable which is on the page.
03:04
So you know, somebody comes to this page directly, this gets set, which for 99% of the time that's what we want.
03:12
But then if there's a query parameter on the page of PN equals zero.
03:18
So if I, if I did this, this PN equals zero, then what we're doing is we're then going to update that view that variable to be a blank string.
03:28
So I'm using a bit of liquid here to say like blank it out basically.
03:32
So now variable is nothing.
03:35
And again this is generally fine.
03:37
If I was sending my create and sell list to register and they're not on the right message list, this is fine like there is no affiliate at play.
03:46
But the problem then becomes because my form is just setting the Affiliate ID custom field to be whatever variable affiliate is, if somebody is already on the email list and then they come here from my email and that person came originally from somebody else, say Jay Clouse sent them to us a while back, that affiliate ID would get overwritten to be nothing, which isn't good.
04:16
So what we do next is we say, okay, check now to see do they exist in our email platform.
04:22
And if they do and the custom field Affiliate ID is set, then set the affiliate custom, the affiliate variable, I'm sorry, to be the affiliate ID from our email platform.
04:35
And again we're just using liquid Write message uses liquid throughout liquid code.
04:40
So now we're resetting this variable to be the custom field value.
04:45
So then finally, if and when they do submit this form, this code up here, this logic not code has been intelligently configured to either make it Justin Walsh's Affiliate id, make it no Affiliate id, or keep it, or have it be the original Affiliate ID that was there before.
05:06
And historically I would have had to do a lot of weird coding and stuff to make this work.
05:11
And now within Vanilla Write Message it's done automatically.
05:15
So again, hopefully this has been interesting and useful to you, but yeah, if you'd like to see more little tidbits of ways to really push right Message to the limits.
05:25
Please let me know.
05:25
Thanks.
Comments
Comments
No comments yet
Using RightMessage to smartly determine the affiliate ID to set — Tella