Search code examples
javascriptjqueryhtmlshopifyshopify-app

Shopify newsletter signup popup for first visitors


I'm going to add a newsletter signup popup for my shopify site. I know there are a lot of shopify apps that support this feature. But I'm going to add it without shopify apps because I need Ometria integrated. (All shopify apps don't have the feature)

So the problem is I need to check for visitors if they are first visitors or not. Then I can create a popup dialog that has newsletter form using any jQuery popup dialog plugins.

Or if there are a free shopify app that has the feature which shows the popup dialog for first visitors and can be added a custom form using HTML not their own form builder.

Can anyone help me?


Solution

  • I unfortunately do not have enough reputation to comment, but you can use a cookie to track whether or not the user has visited your site before.

    If they haven't you can then run the jQuery necessary to display the popup.

    That said, it may also be worth mentioning that you need to be careful with the way in which you implement your popup or really any interstitial (including warnings for the use of cookies on your site). Google now actively penalizes sites that don't use good practice, so it may be worth reading up on it a bit.

    https://webmasters.googleblog.com/2016/08/helping-users-easily-access-content-on.html