Dr Free Gift & BOGO

Can I exclude certain Shopify customers from receiving free gift in your Shopify app?

APP SETUP

While the Dr Free Gift, BOGO Buy X Get Y app doesn’t have a built-in customer exclusion feature in its interface, you can implement customer exclusions through two main methods:

Geographic Location Targeting

You can restrict gift access based on customer location:

  • Access the “Goal Geo Targeting” section in your gift goal settings
  • Choose “Selected countries” option
  • Select specific countries where your promotion should be active


This method works for all visitors, regardless of their login status.

Custom Code-Based Customer Exclusion

You can implement custom exclusion logic using Liquid code that accesses any customer data available through Shopify (tags, customer groups, addresses etc.). This requires adding and maintaining custom code in your theme:

  • The code needs to be added to your theme files
  • You’re responsible for maintaining and updating the code
  • Changes to Shopify’s Liquid or your theme may require code updates
  • Testing is needed when updating your theme or Shopify features


When exclusion conditions are met, the entire app is disabled for that customer:

  • No gift goals will be visible
  • No free gifts can be earned
  • Progress bars and notifications won’t appear
  • The app remains disabled until the customer logs out or switches to a non-excluded account

Basic Tag Exclusion

To exclude customers with a specific tag (e.g., ‘wholesale’):

 

{% if customer and customer.tags contains “wholesale” %} 

<script>window[“freeGiftCartUpsellProAppDisabledForCustomer”] = true;</script>

{% endif %}

Multiple Tag Exclusion

To exclude customers with any of multiple tags:

{% if customer and customer.tags %}

{% assign exclusion_array = ‘Wholesale Customer,Wholesale,wholesale,whole40,Wholesale INTERNATIONAL,Wholesale30,Sweetcarolines30’ | split: ‘,’ %}

{% for tag in customer.tags %}

{% if exclusion_array contains tag %}

<script>window[“freeGiftCartUpsellProAppDisabledForCustomer”] = true;</script>

{% break %}

{% endif %}

{% endfor %}

{% endif %}

Important Considerations

The app does not include built-in customer exclusion features

  • Custom code exclusions:
    • Only work for logged-in customers
    • Require theme file modifications
    • Need maintenance with theme updates
    • Disable the entire app, not individual goals
    • Take effect immediately upon login
  • Geographic targeting:
    • Works for all visitors
    • Affects entire regions
    • Cannot be combined with custom exclusions
  • Test thoroughly after implementation
  • Back up theme files before adding custom code

 

Contact our support team if you need help implementing these solutions. We can provide guidance but cannot maintain custom code long-term.