Skip to main content

Customer Email Export

note

Available since v1.8

Export your customer and newsletter subscriber email addresses as a CSV file, then upload that file to Meta Ads Manager to build Custom Audiences for retargeting and Lookalike Audience campaigns.

Overview

Custom Audiences built from your own customer list are one of the most cost-effective ways to advertise on Facebook and Instagram. You can retarget people who already bought from you, re-engage inactive customers, or build Lookalike Audiences to reach new shoppers who share traits with your best buyers.

The module generates a ready-to-upload CSV file directly from your PrestaShop database — no manual queries, no data formatting. You choose which group to export (registered customers, newsletter subscribers, or both combined), click a link, and download the file. You then upload it in Meta Ads Manager to create a Customer List Custom Audience.

The Export Newsletter Users and Export All options are only available when the PrestaShop blocknewsletter module is installed and enabled. If it is not active, only the registered customers export appears, and the module shows a note explaining that you can also export newsletter subscribers once you activate that module.

Configuration

The export panel is not a settings form — there are no values to save. It is a set of export action links that appear inside the module configuration page.

  1. Go to Modules > Module Manager > Pixel Plus for Facebook > Configure.
  2. Find the Customers section inside the help panel (the blue information panel on the right side of the configuration page).
  3. Click the export link that matches what you want to download:
Export linkWhat it generates
Export CustomersAll registered customer accounts in your store (export-customers.csv)
Export Newsletter UsersAll newsletter subscribers from the blocknewsletter table (export-newsletter.csv). Only shown if blocknewsletter is enabled.
Export AllRegistered customers and newsletter subscribers merged and deduplicated — each email address appears only once (export-all.csv). Only shown if blocknewsletter is enabled.
  1. Clicking the link triggers the export process. The module queries the database, writes the CSV to the /csv/ directory inside the module folder, and immediately serves the file as a download.
  2. Save the downloaded file to your computer.
  3. In Meta Ads Manager, go to Audiences > Create Audience > Custom Audience > Customer list and upload the CSV.

The /csv/ directory inside the module folder must be writable by the web server. If it is not writable, an error message appears at the top of the configuration page before you attempt an export. Fix folder permissions before proceeding.

How It Works

Export Customers (type 1)

The module queries the PrestaShop customer table, selecting all distinct email addresses. In a multi-shop context it filters to the current shop (id_shop). The results are written one email per line into export-customers.csv inside the module's /csv/ folder, then the file is served as a direct browser download.

Export Newsletter Users (type 2)

The module queries the newsletter table from the blocknewsletter module, selecting all distinct email addresses filtered to the current shop. The results are written to export-newsletter.csv and served as a download.

Export All (type 3)

The module runs both queries — registered customers and newsletter subscribers — merges the two email arrays, and uses array_unique to deduplicate them. Every email appears exactly once regardless of whether a person is both a customer account and a newsletter subscriber. The result is written to export-all.csv and served as a download.

CSV format

The file contains only email addresses, one per line, with no header row. This is the exact format Meta's Customer List uploader expects. Meta hashes the email addresses on their side using SHA-256 before matching them against Facebook and Instagram accounts. Your customers' plain-text emails are never stored or processed by Meta.

Multi-shop behaviour

When you are in a specific shop context in a multi-shop setup, each export is filtered to customers and newsletter subscribers belonging to that shop only. Switching shop context in the Back Office before exporting changes which customers are included.

Usage Examples

Example: Retargeting lapsed buyers

Export registered customers (type 1). In Meta Ads Manager, create a Custom Audience from this Customer List. Create a campaign targeting this audience with a discount offer. Because these people already bought from you, they convert at a significantly higher rate than cold audiences.

Example: Building a Lookalike Audience

Export your full customer list (type 1 or type 3). Upload it to Meta Ads Manager as a Custom Audience. Then create a Lookalike Audience based on that audience — Meta finds new people on Facebook and Instagram who share the behavioural and demographic traits of your existing customers. Even a 1% Lookalike based on a few thousand customers can outperform broad interest targeting.

Example: Reaching newsletter subscribers who have never bought

Export newsletter subscribers separately (type 2) and registered customers (type 1). In a spreadsheet, remove email addresses that appear in both files to isolate subscribers who have never placed an order. Upload that filtered list to Meta and show them a first-purchase incentive ad. This segment converts well because they already know your brand.

Important Notes

  • The /csv/ directory inside the module folder must be writable by the web server (755 or 777 permissions). If write permissions are missing, the export fails and an error is shown at the top of the configuration page.
  • The generated CSV files remain on your server after the download. If you are concerned about exposing customer data at a predictable URL, delete the files after downloading. The /csv/ directory has a PHP guard file (index.php) but no .htaccess restriction.
  • There is no scheduled or automated export. Every export is triggered manually by clicking an export link.
  • The CSV contains no column header — just email addresses, one per line. Do not add a header before uploading to Meta.
  • Export Newsletter Users and Export All are only available when the blocknewsletter module is installed and active. If it is not enabled, only Export Customers appears.
  • Exports are per-shop in multi-shop setups. Switch to the correct shop context in your Back Office before exporting if you run more than one store.
  • Meta's match rate (how many of your exported customers are findable on Facebook or Instagram) typically ranges from 30% to 60%. A lower match rate is normal and is not a sign that something went wrong — it just means those customers use a different email on Meta than in your store.

Troubleshooting

ProblemSolution
Error message about /csv/ not being writableSet the permissions of the /csv/ folder inside the module directory to 755 or 777 using FTP, SSH, or your hosting file manager.
No download dialog appears after clicking an export linkThe export likely failed silently. Check PrestaShop's error log. Confirm the /csv/ folder exists and is writable.
"No customers found or the file is not generated" in browserYour store has no customers or newsletter subscribers in the selected source, or the CSV file could not be created. Verify folder write permissions and that the database tables contain records.
Export Newsletter Users and Export All links are not visibleThe blocknewsletter module is not installed or is disabled. Enable it in Modules > Module Manager and return to the module configuration.
Meta rejects the uploaded CSVOpen the file in a text editor and confirm it contains only email addresses with no column header, commas, or extra whitespace. The file should have one email per line and nothing else.
Very low match rate in MetaThis is expected behaviour. Your customers may have registered with different email addresses than they use on Facebook or Instagram. The module exports exactly what is in your database — it cannot influence how Meta matches the addresses.

Frequently Asked Questions

Does Meta store my customers' email addresses after I upload the file?

No. Meta hashes email addresses using SHA-256 during the upload process and matches the hashes against their database. They do not retain or use the plain-text email addresses from your file.

How often should I re-export and refresh the Custom Audience in Meta?

For an active store, once a month keeps your Custom Audience reasonably current. Custom Audiences built from Customer Lists are static snapshots — they do not update automatically when new customers register or new subscribers sign up. You need to re-export and re-upload to include new records.

Can I export only customers who purchased a specific product or category?

No. The export covers all customers in the selected source (registered accounts or newsletter subscribers) without any product, category, or date filtering. For segmented exports you would need to query your database directly or use a dedicated CRM tool.

Is exporting customer emails for Meta advertising compliant with GDPR?

Using customer email addresses for advertising targeting requires a valid legal basis under GDPR — typically either explicit consent for marketing use or a documented legitimate interest assessment. Newsletter subscribers who opted in for marketing communications are generally the safest segment. Consult your legal counsel before uploading any customer data to Meta.

Why does the newsletter export option not appear on my configuration page?

The Export Newsletter Users and Export All options only appear when the PrestaShop blocknewsletter module is installed and active. If it is absent, the module shows a note explaining this. Enable blocknewsletter and reload the configuration page.

What happens if I click Export All and a person is both a registered customer and a newsletter subscriber?

Each email address appears only once in the exported file. The module merges both lists and removes duplicates before writing the CSV, so the same person is never counted twice.

  • Pixel Setup — The pixel tracks on-site behaviour (page views, add to cart, purchases) in real time. Email list Custom Audiences complement pixel-based retargeting by reaching customers who have not visited recently and cannot be cookied.
  • Conversion API (CAPI) — Server-side event tracking improves the accuracy of your pixel data, which in turn improves the quality of pixel-based Custom Audiences built in Meta from behavioural events.