Add Custom Code to Shopify that Sends Email with customer info who Visited the my Store

Add Custom Code to Shopify that Sends Email with customer info who Visited the my Store

Kamal7396
Visitor
2 0 0

Hi,  I am new to Shopify and I require my store. I want to add a custom code that will provide the Contact info of those who visited the store by email  to a sales executive for future Sales, and store it in Shopify 

Here's a breakdown of my requirements in detail:

  1. The code involves several functions, API to send an email, CSS, and HTML, where can I add this code after going to Teams >Edit Code where can I add it so that it won't affect existing processes?
  2. Is it possible or not without affecting the existing processes, to provide me with a better approach or suggestions or a better way to achieve this?

    If you have any suggestions or can assist with implementing this, I would greatly appreciate it. Thank you!
Replies 3 (3)

PaulMartin
Shopify Partner
624 60 147

What do you mean by "who visited the store by email"? Do you have email marketing in place and want to track those who got sent to your site via your email marketing?

Kamal7396
Visitor
2 0 0

I don't have an Email Marketing team, here is my problem statement in clear  "We have an active store in that store we  want to add  a feature that gets the contact info from the user who visited the store [Name, Email, Contact No ] by their log information  this information sent to a sales executive by email, here we have intel that for this requirement  we will need an API for sending info  to an email and some JS script to capture contact info some CSS And HTML  will be needed , we are unaware that where this code should be inserted after  Teams >Edit Code  

PaulMartin
Shopify Partner
624 60 147

I see. I'm assuming this is automatically done? That the user does not need to input any contact information since it's already existing in the customer's data.

I'm not sure what you mean by Teams > Edit Code. But you're going to add the code inside your Theme structure, then create a Javascript file in assets, and add it into your layout so that it can be called wherever that visitor goes in your store. Or if you have a dedicated page where you guys want that trigger to happen, add that script to that page's file.

To answer your previous question:
1. Where to add it? It's going to depend on where you want it to happen, so it's illogical to give you an exact place where you should add it. We can give you an idea where to put it, but the final decision to where to add it will definitely depend on your specific case or need.