Back to blog

How-to Guide to Stitching Together Internal & External Data With Piwik PRO

Data management Use cases

Written by

Published March 6, 2019 · Updated May 7, 2019

How-to Guide to Stitching Together Internal & External Data With Piwik PRO

Customer Data Platforms are known as the brain of the smart marketing stack for good reason. CDP technology facilitates campaign automation, mapping the customer journey across all channels and touchpoints. It supports data analysis and helps marketers manage all their initiatives with minimal use of IT department resources.

And let’s not forget about one more important thing: they let you unify massive volumes of data thanks to CSV import from pretty much everywhere. However, gathering all the relevant data from every corner of your data ecosystem can seem a bit of a hassle.

That’s why we’ll show you in this article what data sources you can use to fuel your Piwik PRO Customer Data Platform (also known as Piwik PRO Audience Manager), and how to successfully upload them into your stack.

Most importantly, we’re also going to discuss some powerful use cases of the data gathered in CDP.

Ready? Let’s do it!

Free Comparison of 4 Enterprise-Ready Customer Data Platforms

Get to know 25 key differences between Tealium, Ensighten, BlueVenn and Piwik PRO to find out which platform fits your business’s needs

Download FREE Comparison

5 most powerful data sources for CDP

First, let’s look at the kinds of information you’ll be able to upload into your CDP. The possibilities are almost endless, so we’ve decided to focus on the most popular and useful ones. Here they are:

1) Analytics

Generic Analytics Data

Some analytics data is tracked automatically once the integration between CDP and Analytics is enabled, for example:

  • analytics visitor IDs
  • activity log
  • browser and device data
  • location data
  • referrer data

Custom Variables & Dimensions

Both Custom Variables and Custom Dimensions tracked in Analytics are automatically mapped to custom profile attributes. Real-life examples of this kind of data include:

  • blog post category
  • blog post author
  • AdBlock detection (true / false)
  • website content groups

Custom Events

Custom Events are also added to custom profile attributes. Using custom events we can monitor pretty much every action performed on our website, for instance:

  • clicks
  • pageviews
  • form completions
  • page scrolls


Each goal tracked in Analytics is automatically saved in the profile as “event” data type.

For each individual goal, Piwik PRO stores:

  • the timestamp of the most recent goal conversion
  • the total number of conversions


Similarly to goals, e-commerce conversions tracked in Analytics automatically store some data in profiles, namely:

  • total number of ecommerce conversions
  • total revenue from all ecommerce conversions
  • revenue from the most recent ecommerce conversion
  • timestamp of the most recent ecommerce conversion

2) Webforms

Another type is the data gathered from webforms. In their case, however, you need to keep data privacy concerns in mind. Users tend to type many different things into forms, and some of those things are considered sensitive data. To avoid data privacy issues, we decided that in the case of Piwik PRO web form Analytics:

  • data is saved to the CDP only when a form is submitted
  • passwords are not saved
  • credit card data is not saved*

* We’re doing our best to make our tools “ignore” data from credit card numbers, but in rare cases when the form is a custom setup, our patterns could be mismatched. In this scenario, credit card data might be captured. That’s why we always recommend that you independently manage the form fields that contain sensitive data (e.g. on payments) to make absolutely sure you don’t collect anything that you shouldn’t.

Data from forms is collected in two ways:

1) Data from forms is saved as custom attributes in user profiles. The name of an attribute is taken from the name of the input field in the form.

For instance, if the form has fields with names defined in HTML attributes such as: name, gender, email_address, they will be saved in the customer profile under attributes with exactly the same names.

stitching data together in piwik pro

2) Also, the Customer Data Platform tests form values in order to find those containing an email address. In case there is a match, regardless of the name assigned to the input field, the email address will be saved as one of the profile IDs under the email attribute.

This means that an email address can be saved as two separate attributes:

  • email – special attribute maintained by the Customer Data Platform as one of the profile IDs
  • email_address – attribute saved directly from the submitted form

If the attribute already exists in the profile, it will be replaced by the latest value sent to the CDP.

3) CSV import

In addition to the data collected from Analytics and from forms, you can import data from third-party platforms. For example, to enrich user profiles, you can take advantage of the information gathered by your CRM.

Here you’ll find full instructions on how to import CSV files to CDP.

4) Mobile applications

Piwik PRO has an SDK library for Android and iOS. It makes integration of your application with Piwik PRO Analytics convenient, and it serves as a replacement for web script tag in mobile devices.

Using SDK you can track:

  • custom profile attributes
  • goals
  • ecommerce events
  • custom variables and dimensions

Fetching those kinds of information works in the same way as web analytics integration described above.

If you decide to track custom attributes via SDK, the following fields are saved:

  • device ID – in the case of iOS, only when the App Store approves this kind of tracking in the review process
  • visitor ID – generated automatically by the SDK, remains unchanged unless the user re-installs the app
  • user ID – if provided
  • email – if provided
  • any key-value pair sent to the CDP saved as a profile attribute and its value

5) API

If that isn’t enough, you can always take advantage of accessing the CDP data through an API. By using a public API, it’s possible to:

  • retrieve a list of audiences the profile belongs to
  • check if a given profile belongs to a given audience
  • retrieve public attributes for a given profile – public attributes are configured in the web UI
  • track custom attributes for a given profile

Piwik PRO Use Cases

Enough theory.

Now that you know what data you can push into your CDP, let’s discuss the ways to apply this data in your everyday work. Read our sample use cases to see what you can gain by merging different types of information into a single record.

Use Case #1: Getting data from Custom Dimensions

This is a real-life example implemented on the Piwik PRO website. We wanted to get information about the popularity of categories on our blog to know which type of content best grabs our readers’ attention. To make the results more accurate, we decided that the tool should take into account only entries to specific blog posts, not the blog’s main page.

To gather this information, we created a Custom Dimension with ID 8:

stitching data together in piwik pro

Then, we created a Custom Variable within Tag Manager based on the CSS selector related to category information on our website:

stitching data together in piwik pro 2

In this case, we’ve used the category class for the element which contains the category name on the single post page so we can extract the value of this element.

After that, we used the value of this Variable as a value for our Custom Dimension with ID 8:

stitching data together in piwik pro 3

And we activated it only for blog posts, but not for the blog homepage:

stitching data together in piwik pro 4

The results

We used data from this Custom Dimension in Analytics reporting to measure the performance of each blog post category:

stitching data together in piwik pro 5

Also, we used it as a condition while building the list in the CDP:

stitching data together in piwik pro 6

This Custom Dimension appears in the Single Customer View as well:

stitching data together in piwik pro 6

Thanks to this, we can identify which blog posts from which categories enjoyed the interest of a given client or prospect. This information will be useful if we decide to send them a dedicated newsletter or personalize the content of the page to resonate with their needs.

Use Case #2: Acting on data gathered in the CDP

The capabilities of the CDP are not limited to collecting and reporting. You can apply it for a wide range of purposes. Here are some of its real-life applications:

Creating audiences

Let’s say you create an audience using segments based on the categories of data coming from different sources like:

  • industry – obtained through data enhancement performed using a CSV file
  • country – gathered by the Analytics module
  • product value – which is the result of webform completion

You can do this by specifying the following conditions:

stitching data together in piwik pro 8

Next, you can easily use this audience in your marketing campaigns. Some ideas on how to leverage its full potential:

  • export it to a CSV and use on another platform (e.g. in your email marketing tool by sending a dedicated newsletter)
  • use it as a trigger in: Tag Manager or On-Site Retargeting

Let’s talk some more about the last two scenarios:

Using stitched data in Tag Manager

Creating triggers allows you to limit their firing to particular audiences:

stitching data together in piwik pro 9

To narrow down your audience even more, you can combine those restrictions with other conditions like:

  • page views of a specific page or group of pages
  • clicks on specific parts of the website (link, button)

This will allow you to ensure that triggers only work for people who fit into your narrow target group.

Example: Firing up an online chat widget within the product only for people from a specific country and industry.

stitching data together in piwik pro 5

Using stitched data in On-Site Retargeting

In Piwik PRO, you can use the same trigger for activating customized content dedicated to a specific pre-defined audience.

Example: You can fire a pop-up about a live webinar to people from a targeted industry and who are located in a time zone that will allow them to participate in the event at a reasonable time of day.

stitching data together in piwik pro 11

Hungry for more? Here you can find some other powerful CDP use cases: Audience Targeting: How to Successfully Use a CDP

Use Case #3: Pushing external data into the Piwik PRO CDP

In the last use case, we would like to present some practical tips for collecting data in your CDP.

Imagine that your company gathers data about online reservations via webforms. As we discussed earlier, you can save this data as custom attributes within an SCV:

stitching data together in piwik pro 12

But what if you want to merge this data with the user activities recorded by another tool?

Well, if the datasets share the same identifier (e.g. email address), you can enrich the data available in the SCV with data from any other tool in your stack.

However, that’s not the only option you have. You can also take advantage of:

CSV Import

This is a manual process which has to be done repeatedly, but it’s very simple to perform. All you have to do is create a CSV file with the identifier along with any other information you want to add to the SCV in the Piwik PRO CDP.

Just like in this sample file:

stitching data together in piwik pro 13

Upon importing such file, the Piwik PRO CDP will add the attributes from the file to the corresponding profiles (the ones with matching emails).

stitching data together in piwik pro 15

JavaScript API

This is more complicated to configure, as it requires some knowledge of coding. However, what it gives in return is full automatization of the process.

Using"updateAttributes", attributes, options); you can push the desired data directly from your system into the CDP module. Configuration depends on the system you’re using. For more details, visit and consult this with a dedicated account manager.

Free Comparison of 4 Enterprise-Ready Customer Data Platforms

Get to know 25 key differences between Tealium, Ensighten, BlueVenn and Piwik PRO to find out which platform fits your business’s needs

Download FREE Comparison

Stitching data together with Piwik PRO – some conclusions

That’s it! We hope that the knowledge presented in this post will help you take fuller advantage of the possibilities of the CDP. Particularly, we’ve tried to make it easier for you to upload data from CSV files.

Whatever you do, be sure to keep in mind the security and privacy of your onboarded data. As a security-conscious vendor, we provide you with all the tools to operate effectively, but it’s your duty to do this in accordance with both internal and external rules of data processing.

Want to learn more about the Piwik PRO Customer Data Platform? Feel free to reach out to us any time!



Karolina Lubowicka

Senior Content Marketer and Social Media Specialist

An experienced copywriter who takes complex topics of data privacy & GDPR and makes them understandable for all. LinkedIn Profile

See more posts by this author