# How to Create a OneLink Template: A Complete Setup Guide OneLink is Amazon Associates' localization tool that automatically redirects international visitors to their regional Amazon storefront — so a UK reader clicking your US affiliate link lands on Amazon UK instead of a store they can't buy from. A **OneLink template** is the configuration layer that makes this redirection work across multiple countries simultaneously. Here's exactly how the template creation process works, and what you'll need to think through before you set one up. ## What Is a OneLink Template? When you create a OneLink template, you're essentially mapping your **default tracking ID** (typically your US Associates tag) to equivalent tracking IDs in other Amazon marketplaces — UK, Canada, Germany, France, Japan, Australia, and others. The template stores these relationships so that when the OneLink script detects a visitor's location, it can: 1. Identify which regional marketplace applies 2. Swap the destination URL to that marketplace 3. Apply the correct regional tracking ID to credit the commission Without a template, the script has no instructions. The template is what gives it the logic to act. ## Before You Start: What You'll Need Creating a OneLink template requires some setup work upfront. You'll need: - **An active Amazon Associates account** (US program, or whichever program you're treating as your primary) - **Approved associate accounts** in each marketplace you want to redirect to (UK, CA, DE, etc.) - **Tracking IDs** from each of those regional programs - Access to your website's code, or a plugin/tag manager that lets you insert a JavaScript snippet If you haven't yet joined regional Amazon Associates programs, you'll need to apply to each one separately. Approval timelines vary by marketplace. ## Step-by-Step: Creating a OneLink Template ### 1. Log Into Amazon Associates and Open OneLink From your Associates dashboard, locate **OneLink** in the top navigation menu. If you don't see it, check under "Tools." OneLink is available to US Associates account holders and is managed from there even when connecting international programs. ### 2. Link Your International Associate Accounts Before building a template, you need to connect your regional accounts. Select **"Link accounts"** and follow the prompts for each marketplace. You'll log in to each regional Associates program to authorize the connection. Once linked, those tracking IDs become available to use inside your templates. ### 3. Create a New Template Click **"Create a new template"** (or "Get Started" if this is your first one). You'll be prompted to: - **Name the template** — use something descriptive, especially if you manage multiple sites - **Select your primary store** — typically the US store, which is the baseline your links are built around - **Choose destination marketplaces** — check each country you want to redirect traffic to ### 4. Assign Tracking IDs by Marketplace 🌍 For each enabled marketplace, assign the tracking ID from that regional program. This is the critical mapping step. The template needs a valid ID for every marketplace you activate — otherwise that region either won't redirect or won't credit properly. Some publishers use a single tracking ID per marketplace. Others create multiple tracking IDs (for different sites or content categories) and select the appropriate one per template. ### 5. Save and Generate the OneLink Script Once your marketplace mappings are saved, Amazon generates a **JavaScript snippet** unique to your template. It looks something like: ``` ``` Copy this exactly as provided — the template ID embedded in it ties the script to your specific configuration. ### 6. Install the Script on Your Site The script needs to be placed on every page where affiliate links appear. Common installation methods: | Method | Best For | |---|---| | Paste into `` manually | Static sites, custom-coded pages | | WordPress plugin (e.g., insert headers plugin) | WordPress without a page builder | | Google Tag Manager | Sites already using GTM, multi-site setups | | Theme functions or child theme | Advanced WordPress users | The script should load on all relevant pages — not just specific posts — since affiliate links often appear in sidebars, menus, or widgets. ## Variables That Affect How Your Template Performs Getting the template created is only part of the picture. How well it works depends on several factors that vary significantly by publisher: **Link format** — OneLink works best with standard Amazon affiliate links. Shortened links, some third-party affiliate management tools, or certain redirect chains can interfere with detection and localization. Native shopping ads and text+image links behave differently than standard text links. **Traffic geography** — If the majority of your audience is domestic, the practical impact of OneLink may be modest. Publishers with significant international readership — particularly UK, Canadian, German, or Australian audiences — see the most meaningful benefit. **Regional catalog overlap** — OneLink redirects the user to a regional store, but it can't guarantee the exact product exists there. If a product isn't available on Amazon UK, the redirect may land on a search results page or the homepage rather than the product page. This varies by product category and marketplace. **Associate account standing** — All linked regional accounts need to remain active and in good standing. A terminated or inactive regional account will break the redirect for that marketplace. **Script loading behavior** ⚙️ — If your site uses heavy caching, lazy loading, or certain Content Security Policies (CSPs), the OneLink script may not fire correctly on every page load. This is a technical consideration that depends entirely on your site's infrastructure. ## Multiple Templates and When They Apply You can create more than one OneLink template — useful if you run multiple websites, each targeting different audiences or using different regional programs. Each site would get its own script with its own template ID. Some publishers also create separate templates to test different tracking ID combinations, or to handle specific content sections differently. The right template structure depends on how many sites you manage, how segmented your affiliate tracking needs to be, and whether your international traffic is evenly distributed or concentrated in specific regions. Those factors look different for every publisher — which means the optimal template setup for your situation isn't something a general guide can fully prescribe. 🗺️