So you have an existing email list and you want to avoid “duplicating” emails. This is often a concern when the user who is registering enters a different email address inside the social network. Luckily, overwriting the emails collected from a social application is fairly easy to do. This document outlines how to get it done.
Email to Web Page
This diagram outlines the flow of email to web page. In this simple example, the page links the email in the URL to a Spotify account.
MailChimp
Mailchimp has two pages that outline how to use merge tags and create unique urls:
https://mailchimp.com/help/getting-started-with-merge-tags/
https://mailchimp.com/help/create-unique-urls-for-subscribers/
Sample HTML
This HTML shows how you can implement the overwrite on page with AEJS.
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <script type="text/javascript" charset="utf-8" src="https://theappreciationengine.com/w/js/XXX"></script> <link href="http://netdna.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.css" rel="stylesheet"> <script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.js"></script> <script src="http://netdna.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.js"></script> <script type="text/javascript"> var globalAEJS; function loginHandler(user,type,sso) { alert("SIGNED UP. THANKS."); $("#loggedin").show(); //allow logout $('#signup').hide(); } function userHandler(user,state) { $("#loggedin").show(); //allow logout } function logoutHandler(user) { alert("LOGGED OUT. THANKS."); $("#loggedin").hide(); } function AEJSReady(aeJS) { globalAEJS = aeJS; console.log("AEJS READY"); aeJS.events.onLogin.addHandler(loginHandler); aeJS.events.onUser.addHandler(userHandler); aeJS.events.onLogout.addHandler(logoutHandler); } </script> </head> <!-- AEJS form to capture custom user data (email) and register a service (spotify) Uses hidden field with email set from url query string eg ?email=.... --> <body style="padding: 20px;"> <h1 class="page-header">AE JS DEMO - Link Email</h1> <form id="email-signup" data-ae-register-form="spotify" method="post"> <input type="hidden" id="email" name="email" value="<?php echo $_GET['email'] ?>"> <button type="submit" class="btn btn-primary">SPOTIFY BUTTON</button> </form> <br/> <div id="loggedin" style="display: none;"> <a href="#" data-ae-logout-link="true" class="btn btn-danger">LOGOUT</a> </div> </body> </html>