Advertiser Quickstart

As an advertiser on our platform, we offer the ability to track conversions and create custom audiences within our system. This is essential for optimizing your campaigns and accurately calculating metrics like Return on Ad Spend (ROAS). To achieve this, your website needs to ping us back on ad landing pages and any audience creation pages (e.g., tracking checkout conversions).

Tracking Types

We offer two tracking types: URL and Event.

  • URL Tracking: Use this if you don't need extra control over how the audience is created. For example, if a user visits /checkout/success, it is considered a conversion.
  • Event Tracking: Use this for more detailed audience tracking, such as tracking specific actions like "People that clicked on this button."

Why ROAS Tracking and Event Tracking Are Important

  • ROAS Tracking: Calculating ROAS accurately allows you to understand the effectiveness of your ad spend. By knowing the revenue generated from your ad campaigns, you can optimize your budget allocation and improve campaign performance.
  • Event Tracking: This provides more granular data, enabling you to track specific customer actions such as items added to the cart or completed purchases. This level of detail helps in creating more targeted and effective campaigns.

Integration Steps

Add the Armanet SDK

Include the Armanet SDK in the <head> section of your page using the following code:

<head>
  <script src="https://assets.armanet.us/armanet-pxl.js" defer></script>
</head>

URL Tracking

If you only need to support URL Tracking Type, just adding the SDK is enough. Now follow these steps:

  1. Log in to the control panel.
  2. Create an audience.
  3. Select the URL Tracking Type.
  4. Provide your checkout success URL.

Event Tracking

Event Tracking Type allows for detailed tracking and ROAS calculation. Here’s how to implement it:

Track Items Added to Cart

Add JavaScript code to send an event to Armanet whenever an item is added to the cart. Use the following code:

Armanet.sendEvent('addedToCart', {
  itemId: 123456,
  upc: "123456",
  price: 123.45,
  quantity: 1
});

Track Orders Placed

Add JavaScript code to send an event to Armanet on the order success page to track completed orders. Use the following code:

Armanet.sendEvent('purchased', {
  orderNumber: "123456",
  orderTotal: 123.45,
  coupon: "SUMMER10",
  items: [
    {
      itemId: 123456,
      upc: "123456",
      price: 123.45,
      quantity: 1
    },
  ]
});

Google Tag Manager

If you manage your site scripts through a tag manager (GTM, Tealium, Adobe Launch, etc.), you can still push Armanet events without touching your page templates directly. Instead, use the global ArmaLayer queue in a Custom HTML tag.

Load the Armanet Pixel

Add this to your tag manager as an "All Pages" tag:

<script src="https://assets.armanet.us/armanet-pxl.js" defer></script>

Create a Custom HTML Tag

  1. In GTM, click Tags → New → Custom HTML.

  2. Name it something like Armanet: Purchase Event.

  3. Paste in your snippet:

    <script>
      window.ArmaLayer = window.ArmaLayer || [];
      window.ArmaLayer.push(() => {
        Armanet.sendEvent('purchased', {
          orderNumber: {{Order ID Variable}},
          orderTotal: {{Order Total Variable}}
        });
      });
    </script>
    
    • window.ArmaLayer = window.ArmaLayer || []; Ensures the ArmaLayer queue exists if the main Armanet library hasn’t loaded yet.
    • .push(() => { … }) Defers your sendEvent call until Armanet is initialized.
  4. Replace {{Order ID Variable}} and {{Order Total Variable}} with the corresponding GTM Data Layer variables (or macros) that carry your order data.

Set Up a Trigger

  1. Under Triggering, click the "+" icon and choose the event you want (e.g., a "Purchase" Data Layer event, or a Page View on your order confirmation page).
  2. Configure it so the tag fires after your e-commerce data has been pushed into the Data Layer.

Publish & Verify

  1. Preview your container and place a test order (or manually push into the Data Layer).
  2. In the GTM debug console you should see your "Armanet: Purchase Event" tag fire.
  3. Open the Network tab and look for requests to Armanet’s endpoint.