All Collections
Advertiser
Advertiser Knowledge Base
advanced tag Implementation Guide for Advertiser - Generic
advanced tag Implementation Guide for Advertiser - Generic

Technical implementation guide of the advanced tag container by advanced store

Heiko Vogelgesang avatar
Written by Heiko Vogelgesang
Updated over a week ago

TOC:

For our basic retargeting you just need to implement one simple line on every page of your site without any condition.

Basic retargeting pixel

<script type="text/javascript" charset="utf-8" src="https://ad4m.at/[your_advanced_tag_id].js"></script>

Simple as that! However, to allow us to achieve the best possible performance we highly recommend to place this code directly in your page and add some more information to the pixel. This is described below. 

Integration in a container tag solution

If for some reason it's not possible to place the advanced tag code directly on your page, because you're using a container tag solution like Google Tag Manager, please pass dynamically the current page url to the config.

Generic Example:

<script type="text/javascript" charset="utf-8" src="https://ad4m.at/[your_advanced_tag_id].js"></script>
<script type="text/javascript" charset="utf-8">
ADVANCEDSTORE_MAGICTAG.config({
    pageUrl: "https://www.example.com/..."
});
</script>

💡 You'll also find a specific documentation for the integration of the advanced tag into Shopify and Google Tag Manager.

Extended (dynamic) retargeting pixel

In order to be able to target the visitors of the site even more specifically and increase the quality of the campaigns, we recommend to additionally fill in the following parameters. If any of the information is not available, simply leave the parameter empty.

<script type="text/javascript" charset="utf-8" src="https://ad4m.at/[your_advanced_tag_id].js"></script>
<script type="text/javascript" charset="utf-8">
ADVANCEDSTORE_MAGICTAG.config({
    rtOptout: false,
    orderValue: "",
    orderId: "",
    pageType: "",
    pageUrl: ""
});
</script>

Explanation of all parameters

Name: rtOptout
Description: Indicates to stop retargeting. Set to true if the user bought something or finished the registration. Otherwise set to false.
Type: Boolean
Example: false

- - -

Name: orderId
Description: Unique ID of the conversion. Usually the order number of your system.
Type: Integer
Example: 1234564798

- - -

Name: orderValue
Description: Sales value of the conversion.
Type: Integer
Example: 19.19 

- - -

Name: pageType
Description: Type of page the user is currently viewing. Possible values: "product", "category", "cart", "checkout" or "other"
Type: String
Example: cart

- - -

Name: pageUrl
Description: URL of the current page
Type: String
Example: https://www.example.com/subfolder/page
(This parameter is optional. Only needed if the advanced tag is not directly integrated into the page. E.g. in container tag solution. If not needed please remove this parameter completely.)

Extended product retargeting pixel

If the retargeting should also be based on actual products, please provide information about the product, the category and the feed within the tag.

<script type="text/javascript" charset="utf-8" src="https://ad4m.at/[your_advanced_tag_id].js"></script>
<script type="text/javascript" charset="utf-8">
ADVANCEDSTORE_MAGICTAG.config({
rtOptout: false,
orderValue: "",
orderId: "",
pageType: "",
pageUrl: "",
productIds: "",
productCategoryIds: ""
});
</script>

Explanation of all parameters

Name: productCategoryIds
Description: ID or name of viewed category.
Type: String or Integer.
Example: 987

- - -

Name: productIds
Description: ID or name of viewed product. For more than one product, please use a comma separated list.
Type: String or Integer.
Example: 123
Example: "abc123,def456,ghi789"

- - -

Name: feedId
Description: Only needed if more than one feed is provided per program. Identifier for the feed where the product can be found. Value has to be coordinated with your advanced store key account.
Type: String.
Example: "DE"

Optional identifier for the feed

In case you're providing more than one product feed, please be sure to also set a feed identifier where the product ID or product category ID can be found. The feedId has to be coordinated with your key account at advanced store. In most cases, that can be left blank.

<script type="text/javascript" charset="utf-8"> advancedStoreTag.config({ 
feedId: "abc123",
});
</script>

If you have any question during the implementation feel free to get in contact directly. In our live chat also technical support by developers is provided.

Examples

Example for a product page:

...
<script type="text/javascript" charset="utf-8">
ADVANCEDSTORE_MAGICTAG.config({
    rtOptout: false,
    orderValue: null,
    orderId: null,
    productIds: "123456",
    productCategoryIds: "123",
    pageUrl: "https://www.example.com/..."
});
</script>

Example for a category page:

...
<script type="text/javascript" charset="utf-8">
ADVANCEDSTORE_MAGICTAG.config({
    rtOptout: false,
    orderValue: null,
    orderId: null,
    productIds: null,
    productCategoryIds: "123"
});
</script>

Example for an order confirmation page:

...
<script type="text/javascript" charset="utf-8">
ADVANCEDSTORE_MAGICTAG.config({
    rtOptout: true,
    orderValue: 12.23,
    orderId: "123456",
    productIds: null,
    productCategoryIds: null
});
</script>

GDPR

To comply with the GDPR please check our article about the consent mechanism at https://support.advanced-store.com/en/articles/4510008-advanced-tag-gdpr-consent-mechanism.


Content Security Policy

If you like to use a Content Security Policy for the tag integration to ensure that it is secure, please use the following CSP:

Content-Security-Policy: img-src https://cm.g.doubleclick.net/ https://ih.adscale.de/ https://a.twiago.com/ https://ad.yieldlab.net/ https://dsum-sec.casalemedia.com/ https://rtb-csync.smartadserver.com/ https://pixel.onaudience.com/ https://simage2.pubmatic.com/; frame-src https://ad4m.at/ https://ad4mat.net/; connect-src https://as.ad4m.at/ https://ad4m.at/; script-src https://ad4m.at/

⚠️ Please be aware that this is the default setup. Depending on your campaign setup, there are also other partners that can be called and not part of the default CSP above.

Did this answer your question?