r Back

Pecan

SEO & Marketing
Webflow Development

When Pecan's art director- Yonatan, approached me and asked about some Webflow development issues, I had no idea how deep this rabbit hole goes...

Working on this project gave me tons of new knowledge. I had to figure out how to create custom form fields that can integrate with multiple platforms at once, while sending all the relevant information to the marketing team. A connection to Google analytics was the first integration, which is quite straightforward. Once this connection is established, Tag manager comes in, and information on user sessions and leads starts to flow. Page visits, buttons clicks and forms fills are some basic requirements.


<script>
document.getElementById('contact-form').addEventListener(
  'submit', function(event) {

    var tracker = ga.getAll()[0];
    var clientId = tracker.get('clientId');
    var userId = tracker.get('userId');
    
    document.getElementById('GACLIENTID').value = clientId;
    document.getElementById('GAUSERID').value = userId;
});
</script>

On top of that, we had to connect Salesforce to every form in the website. That step had to be done "manually". I added hidden input fields on every form, to connect the userIDs, clientIDs, and trackIDs from Google analytics, and send them to the salesforce CRM. Those fields were automatically filled by a script, once the form was submitted. I've added another script to track which page the form was sent from, so we can calculate conversion rate on each page of the website.