Back to blog

How to Create Targeted Campaigns by Integrating Customer Data Platform with Ad Platforms

Data management Tag Manager

Written by ,

Published July 17, 2019 · Updated April 11, 2024

How to Create Targeted Campaigns by Integrating Customer Data Platform with Ad Platforms

The Piwik PRO Customer Data Platform provides tremendous possibilities for marketers. You get collection and storage of data from multiple sources, such as:

  • analytics data
  • information collected via webforms
  • any other data imported via webhooks, for example from transactional systems

Better yet, integration with Google Ads and Facebook Ads platforms means marketers can use audiences previously created in CDP when preparing remarketing campaigns.

In other words, because you know your users (even those who remain anonymous), you can reach out to them using tailored ads with Google Ads and Facebook Ads.

For this use case we’ll create a simple audience containing all the profiles stored in our CDP which are anonymous, meaning their email address is unknown.

This post is a technical guide supplementing a previous post where we discussed the strategy of CDP integration with ad platforms.

Let’s get down to business!

Create an anonymous user audience

In the Customer Data Platform we need to create an audience for anonymous users. Since they’re most likely first-time visitors, we don’t have any info about them yet.

This screenshot shows the Anonymous audience in Piwik PRO’s CDP and the conditions settings.

This is a basic example, using only the condition “Email: is empty”, but you can easily add other conditions, for example:

  • source campaign information
  • location information
  • technology information (device, browser, OS)
  • custom dimensions

Now that our audience is set up, let’s move on to configuring Tag Manager to fire tags exclusively for our newly created “anonymous audience”.

Creating dedicated remarketing tags in Tag Manager

We’ve created the audience in CDP. Now let’s create a remarketing tag that will fire exclusively for them. This setup allows you to have multiple audiences with dedicated tags. In other words, you can set up several campaigns tailored to diverse custom groups.

For more information about Tag Managers check out this post:
Enterprise Tag Manager Vendor Comparison: Which TMS Should You Choose?

Creating dedicated tags for Google Ads

First, choose the template:

Fill in the Conversion ID and enable “Exporting audience to Google adwords”, selecting “Anonymous”.

The Conversion ID is provided by Google Ads when you configure remarketing to create audiences for campaigns.

To avoid changing the existing Consent Manager configuration, select the “Remarketing” tag type and “Respect visitor privacy” option.

Creating dedicated tags for Facebook Ads pixel

Tag configuration for Facebook Ads is similar to Google AdWords. The only difference is we have to choose the “Facebook Pixel” tag template from the list:

Provide the Pixel ID and choose the audience to export. Again this will be our “Anonymous” audience.

Set up the “TAG TYPE” and “Respect visitor privacy” to work with your consent manager settings.

You will find Pixel ID in the “Pixel” section of the Facebook Ads manager panel:

Triggering the tags

During the creation of our Google and Facebook Ads tags the following message is displayed under the “export audience” option:

This is a reminder that in addition to exporting this audience we also need to set our corresponding tags to only fire for this audience.

We only want this tag to fire for the “Anonymous” audience, so here’s what the trigger configuration should look like in this case:

Both new tags (Google Ads and Facebook Ads) will have the same trigger configuration, so we only need to create this trigger once, then select it from the list when configuring the other tags.

So now our audience, tags and triggers setup is finished. It’s time to configure the advertising platforms. Let’s start with Google Ads.

Go to Audience Manager in Google Ads:

Now we configure a new audience:

The “Anonymous” audience is already available because Piwik PRO previously fired the tag for users matching the anonymous profile criteria and sent requests to Google Ads for this audience.

To use this audience we have to set 1 (true) as the value.

Depending on the size of the audience, you should wait at least 24 hours to give Google time to record the request. If the audience is very specific it can take more time. If the audience is general it should be ready the next day.

Facebook Ads configuration

Navigate to the Audiences section in Facebook Ads:

Again, we have to create a new audience in order for our “Anonymous” audience to be available, and Facebook has to receive a request from Piwik PRO Analytics Suite. How long it takes to receive audience specific requests depends on the size of the audience and traffic volume.


Free comparison of 7 enterprise-ready customer data platforms

Get to know over 50 key differences to determine which platform fits your business needs best: Tealium, Amplitude, Exponea, mapp, Segment, mParticle or Piwik PRO.

Reviewing the audiences

After some time you can check how well the ad platforms are populating the anonymous audiences and if they’re ready to use for retargeting.

From over 201,000 profiles Google was able to match a few thousand.

It’s worth pointing out that Google is constantly building this list, and it contains highly anonymous profiles which are more difficult to match.

Facebook Ads

Facebook is matching anonymous profiles from our audience with its user base. The size of the FB audience is still quite small because it’s exclusive to anonymous users, but we can expect this to grow over time.


Integration of multiple tools like CDP, Tag Manager, Google Ads and Facebook Ads gives marketers the opportunity to increase conversion rates and improve visitor engagement through highly targeted remarketing. We hope this walk through will help you configure your own platforms to get the most out of the tools you’re using. If you have any questions about CDP integrations or anything else analytical, don’t hesitate to reach out!


Szymon Grzesiak

Head of Marketing Technology

Marketing expert with over 10 year experience in SEO and SEM campaigns. Last years mostly worked on the B2B lead acquisition. Wordpress webmaster with HTML and CSS knowledge. LinkedIn Profile

See more posts by this author


Peter Curac-Dahl

See more posts by this author

Core – a new plan for Piwik PRO Analytics Suite

Privacy-compliant analytics, built-in consent management and EU hosting. For free.

Sign up for free

Upcoming live webinar

June 27, 2024

Real-time dashboards in Piwik PRO: A hands-on use case

This summer, we’re introducing new real-time dashboards in Piwik PRO Analytics Suite, empowering our clients to make informed decisions in time-sensitive projects. Would you like to learn how to use them in your daily work? Join our webinar to see how our partner agency, Netlife, used real-time insights to streamline the registration process for a major national event, ensuring a smooth user experience and preventing system breakdowns. Stay for a Q&A session where our experts will address all your questions.

Sign up for this webinar