LogoLogo
MerchantsHelpSign in
  • Overview
    • Countries & Currencies
    • Glopal Solutions Portfolio
  • Getting started
    • Shopify
      • Glopal Duty & Tax for Shopify
      • Shopify Collaborator Access
    • BigCommerce
    • Magento (Adobe Commerce)
      • Magento 1
      • Magento 2
        • Magento Activation
        • Magento Configuration
        • Magento Database Model
    • Visualsoft
    • PrestaShop
  • Marketing Solutions
    • Acquisition channels
      • Integrate Google Ads
      • Integrate Facebook Ads
    • Feed localization
      • Read domestic items
      • Localize the items
      • Upload the localized items
    • Features / Customization
      • Google Shopping countries coverage
      • Filters
      • Free listings
      • Comparison Shopping Services (CSS)
    • Google Ads
      • Conversion tracking
      • Standard accounts structure
      • Launching and monitoring Google Ads campaigns
    • Facebook
      • Facebook & Instagram Shops
      • Catalog Based Campaigns
      • Conversion and Brand awareness campaigns
      • Facebook conversion tracking
    • Email marketing
  • Localization
    • Site localization
      • Content localization
      • Price localization
      • Site search
      • Checkout
      • User account
    • Site discovery
      • Domains and Routing
      • Search engine optimization
      • Geo-localization
      • Country selector
    • Content distribution
      • Site security
      • Domains (DNS)
      • Traffic Splitting
        • Akamai
        • Cloudflare
        • Nginx
        • Microsoft IIS
        • AWS CloudFront
        • Magento Cloud
      • Third-party CDN
        • Cloudflare
      • Site speed
    • Integrations
      • CSS customizations
      • JavaScript customizations
      • Server-side customizations
      • Exclude from localization
      • Integration examples
        • Hiding Products
        • Newsletter Signup
        • Custom Price Logic
  • Checkout
    • Localized checkout
      • Overview
      • Styling
      • Integration
        • Callback Functions
        • Confirmation Page
        • Checkout Analytics
        • Allowlisting Glopal IPs
      • Price localization
    • Order processing
      • Order creation
        • Plug & Play integration
        • Order API
        • Event webhook
        • Custom Integration
      • Cancellation & refund
      • Returns
      • Buyer's communication
      • Customer account
    • Financials
      • EU VAT
  • DUTY & TAXES
    • Product Classification
    • Duty & Tax Calculation
      • Product Pricing
      • Supported Countries
    • Compliance Checks
      • Prohibited Goods
      • Denied Party Screening
  • SHIPPING
    • Order Creation
    • Label Generation
    • Manifest
    • Tracking
  • Translations
    • Translation Editor
  • MERCHANT ACCOUNT
    • Dashboards
      • SEO dashboard
  • What's New
    • Release Notes
Powered by GitBook
On this page
  • Client Side customization
  • Server Side customization
  1. Localization
  2. Integrations
  3. Integration examples

Newsletter Signup

PreviousHiding ProductsNextCustom Price Logic

Last updated 4 months ago

Glopal takes your existing site as the source when deliverying localized sites. Glopal automatically adapts experience for the buyer, rewriting all links, translating text and localizing prices as required.

Any action that user does on the localized site (adding product to the wishlist or the cart, or signing up for the newsletter) will be processed as if user is doing the same action on your existing source site.

Sometimes you may want to capture localization context, eg. to recognize that user is visiting your Spanish localized site and process newsletter signup knowing that user should be added to the Spanish users newsletter group.

Glopal offers access to this localization context:

  1. As HTTP headers for

  2. As JavaScript global variable for

Let us show two possible customizations to record country of the visitor for newsletter signup.

Client Side customization

Create additional (hidden) field for your newsletter form, that should produce HTML similar to:

<input type="hidden" name="country" id="newsletterCountry" />

Now using Glopal's JavaScript global variable we can automatically set hidden field value

const field = document.getElementById("newsletterCountry");
field.value = glopal.config.target.countryCode;

Some form builders may allow defining dynamic value directly, in such case you can use glopal.config.target.countryCodeas dynamic JS value.

Server Side customization

If you have your own custom backend code that is receiving form submission, you can get country of the localized site from X-GlopalHTTP headers, for example:

<?php

...
$country = $_SERVER['X_GLOPAL_COUNTRY'];

save_signup($data, $country);

server-side customizations
JavaScript customization