This guide explains how to implement HubBox pickup point selection on your website using Google Tag Manager (GTM). This approach is intended for websites or ecommerce platforms where direct access to modify checkout page code is not available. GTM allows you to inject the HubBox Tag onto the page without modifying the underlying platform.
For full details on the HubBox Tag, refer to the Tag documentation.
Tag documentation
GTM is configured to insert and execute the HubBox Tag script on your checkout pages. When triggered correctly, the script loads the HubBox pickup point selection interface, allowing customers to choose a collection location during checkout.
| Requirement | Details |
|---|---|
| Active GTM container | Correctly installed and firing on all relevant pages, including the full checkout flow |
| GTM permissions | Sufficient access to create tags and triggers and publish changes |
| HubBox Tag script | The JavaScript snippet provided by your HubBox Integrations Manager |
Before working in GTM, ensure you have the correct HubBox Tag script from your HubBox Integrations Manager. This unique JavaScript snippet initialises the HubBox service, renders the pickup point selection interface within your checkout, and handles the selection process.
You can access the Tag script via Console by going to "Setup" and then "Tag Management" in the menu.
The trigger tells GTM when and on which pages to execute the HubBox Tag. The goal is to fire it on your checkout page(s) once the main page elements are ready.
The Window Loaded trigger waits until the browser has finished loading all page content, including scripts and images. This ensures the elements HubBox needs to interact with are available before the tag fires.
In your GTM workspace, click Triggers in the left menu, then click New.
Give your trigger a descriptive name, for example: HubBox - Trigger - Checkout Window Loaded.
Click the Trigger Configuration box and select Window Loaded.

Under This trigger fires on, select Some Window Loaded Events. Configure the condition to target your checkout URL(s):
Page URLcontains (or matches RegEx, starts with, depending on your URL structure)checkout, /store/checkout, or order/shipping

Click Save.
If the word checkout appears elsewhere on your site where you do not want HubBox to load, use a more specific condition. For example: Page Path starts with /checkout/shipping.
If your checkout is an SPA where the URL does not fully reload between steps, the Window Loaded trigger may only fire once on initial page load. In this case, consider:
Consult your development team or GTM documentation if the Window Loaded trigger proves unreliable for your setup.
HubBox UI appears too late on the pageIf Window Loaded causes a noticeable delay before the HubBox UI appears, you can experiment with the DOM Ready trigger instead. However, ensure all elements the HubBox script depends on are present in the DOM at the point the trigger fires.
The tag holds your HubBox JavaScript and links it to the trigger created in Step 2.
Click Tags in the left menu, then click New.
Give your tag a descriptive name, for example: HubBox - Custom HTML - Load Widget.
Click the Tag Configuration box and select Custom HTML.

Paste the entire HubBox Tag script (obtained in Step 1) into the HTML text area. Copy and paste it exactly as provided — do not modify the script.
Click the Triggering box and select the trigger created in Step 2 (e.g., HubBox - Trigger - Checkout Window Loaded).
Click Save.
Thorough testing before publishing is essential when injecting scripts into a checkout via GTM.
HubBox - Custom HTML - Load Widget) appears under Tags Fired.Once you are fully satisfied with testing in Preview mode:
Added HubBox Tag for Pickup Points.The HubBox Tag will now be live for all users.
Once the HubBox Tag is correctly implemented and published via GTM:
This is typically a trigger timing issue. Try the following:
This is most likely a script or configuration issue rather than a GTM issue. Confirm:
configId is correctly set within the script.Contact HubBox support if the issue persists after verifying the above.
HubBox conflicts with other GTM tags or checkout scriptsUse GTM's tag sequencing or tag pausing features to isolate the HubBox tag and identify conflicts. Test with other tags paused to confirm whether the issue is caused by an interaction with another script. If a conflict is identified, adjust the firing order or consult your development team.