Tracking in-store loyalty program registrations via QR codes for a store competition

Running competitions between physical stores is a proven way to motivate staff and increase loyalty program sign-ups. By assigning each store a unique QR code that links to the registration page, you can track exactly which store drove each new membership.

This use case describes how to set up end-to-end tracking and reporting of in-store loyalty program registrations in Synerise. Each physical store distributes a unique QR code containing a registration URL with a store identifier (for example, https://www.example.com/create-account?store_ABC). When a customer scans the code and completes the full registration process — e.g. submitting the form, confirming the account, and opting in to the newsletter — the registration is attributed to that store.

Synerise collects the relevant events, builds a segmentation of fully qualified registrations, and generates a monthly report broken down by store. This use case covers the full process up to the point where the report is ready — how you choose to distribute the results (for example, via email, SharePoint, or another external tool) depends on your specific business needs.

Based on the report, the business can reward the stores with the highest number of complete registrations in a given period.

All event names, attributes, and business rules described in this use case are specific to this implementation and serve as an example. For other projects, different naming conventions, conditions, or constraints may apply — for example, which store identifier is used, which marketing agreements are required, or what the time window between registration and confirmation should be.

Prerequisites


  • Implement a tracking code on your website.
  • Have an integrated registration form on the website so that when a customer completes the form, a form.submit event is generated on their profile. This event must contain at least the following parameters:
    • uri — the full URL of the registration page (including the store identifier in the query string),
    • formType — the type of form, for example with the value registration.
  • Have a mechanism for tracking account confirmation. In this example, the profile.updated event is generated with the activation parameter set to true when a customer confirms their account.
  • Have a mechanism for tracking newsletter agreement activation. In this example, the marketingAgreement.turnOn event is generated when a customer enables the newsletter agreement.
  • Have a custom profile attribute (in this example, subscriptionDate) that stores the date when the customer opted in to the newsletter, in date format (yyyy-mm-dd). This attribute is not available by default — it must be implemented separately, for example by sending it from an external system or by creating a workflow that reacts to the marketingAgreement.turnOn event and saves the current date to this attribute on the customer's profile.
  • Generate unique registration URLs per store with a consistent identifier pattern in the query string (for example, ?store_ABC, ?store_XYZ).
  • Create API keys with appropriate permissions for report retrieval.

Process


In this use case, you will go through the following steps:

  1. Create an event aggregate that returns the last registration form URI.
  2. Create a profile aggregate for account confirmation with store origin.
  3. Create a segmentation of fully qualified registrations.
  4. Create a report with monthly registration counts per store.

Create an event aggregate for registration URI


This aggregate returns the last URI from the form.submit event where the form type is registration. It will be used later in the profile aggregate and segmentation to check whether the registration originated from a store link.

  1. Go to Behavioral Data Hub icon Behavioral Data Hub > Live Aggregates > Create aggregate.
  2. As the aggregate type, select Event.
  3. Enter a name for the aggregate, for example Last URI from registration form submit.
  4. Set Analyze events by to Last.
  5. From the Choose event dropdown list, select the form.submit event.
  6. As the event parameter, select uri.
  7. Click the + where button.
  8. From the Choose parameter dropdown list, select the formType parameter.
  9. From the Choose operator dropdown, choose Equal.
  10. In the next field, enter registration.
  11. Set the time range to Lifetime.
  12. Save the aggregate.
Configuration of the event aggregate returning last registration form URI
Configuration of the event aggregate returning the last registration form URI

Create a profile aggregate for account confirmation


This aggregate returns the last timestamp of the profile.updated event where the account was confirmed (activation = true) and where the registration originated from a store link (the event aggregate from the previous step contains the store identifier). It will be used in the segmentation to verify the chronological order of events.

  1. Go to Behavioral Data Hub icon Behavioral Data Hub > Live Aggregates > Create aggregate.
  2. As the aggregate type, select Profile.
  3. Enter a name for the aggregate, for example Account confirmation timestamp after in-store registration.
  4. Set Analyze profiles by to Last.
  5. From the Choose event dropdown list, select the profile.updated event.
  6. As the event parameter, select TIMESTAMP.
  7. Click the + where button.
  8. From the Choose parameter dropdown list, select the activation parameter.
  9. From the Choose operator dropdown, choose Equal.
  10. In the next field, enter true.
  11. Click the + where button.
  12. From the Choose parameter dropdown list, select the event aggregate created in the previous step.
  13. From the Choose operator dropdown, choose Contain.
  14. In the next field, enter the store identifier prefix, for example store_.
  15. Set the time range to Last month (or adjust according to the reporting period).
  16. Save the aggregate.
Configuration of the profile aggregate for account confirmation with store origin
Configuration of the profile aggregate for account confirmation with store origin

Create a segmentation of qualified registrations


In this part of the process, create a segmentation that identifies customers who completed a full loyalty program registration through a store link. A customer qualifies if they performed all of the following actions within 7 days, in any order:

  • Submitted the registration form (form.submit) from a URL containing the store identifier.
  • Confirmed their account (profile.updated with activation = true).
  • Enabled the newsletter agreement (marketingAgreement.turnOn).

The segmentation consists of two segments connected by an OR operator. The reason for splitting the segmentation into two segments is that there are two distinct groups of customers who qualify:

  • Segment A — customers who registered through the store QR code, confirmed their account, and opted in to the newsletter — all within 7 days. These are entirely new customers who completed the full process during the competition period.
  • Segment B — customers who registered through the store QR code and confirmed their account within 7 days, but already had the newsletter agreement from before (for example, they subscribed via the website footer months ago). These customers did not need to opt in again — they only needed to register and confirm.

To track when the newsletter agreement was originally given, this implementation uses a custom profile attribute (in this example, subscriptionDate) that stores the date of the newsletter opt-in in date format (yyyy-mm-dd). It must be set up beforehand (see Prerequisites).

  1. Go to Analytics icon Decision Hub > Segmentations > New segmentation.
  2. Enter the name of the segmentation, for example Fully qualified in-store loyalty registrations.

Configure Segment A


Segment A captures customers who completed all three actions (form submission, account confirmation, newsletter opt-in) within 7 days. Because the events can happen in different orders (for example, newsletter agreement before or after account confirmation), you define two condition groups connected by OR to cover both orderings.

First condition group:

  1. Click Add condition.
  2. From the dropdown list, select the form.submit event.
  3. Click the + where button and select the uri parameter.
  4. From the Choose operator dropdown, choose Contain and enter the registration page URL, for example www.example.com/create-account.
  5. Click the + where button and select the uri parameter again.
  6. From the Choose operator dropdown, choose Contain and enter the store identifier prefix, for example store_.
  7. Below the first condition, in the and then... section, click Add condition.
  8. From the dropdown list, select the profile.updated event.
  9. Click the + where button and select the activation parameter.
  10. From the Choose operator dropdown, choose Equal and enter true.
  11. Click the + where button and select the event aggregate created earlier.
  12. From the Choose operator dropdown, choose Contain and enter the store identifier prefix, for example store_.
  13. Click the + where button and select the TIMESTAMP parameter.
  14. From the Choose operator dropdown, choose Custom and set the date range to the reporting period (for example, 1 Feb 2026, 00:00 to 28 Feb 2026, 23:59).
    The custom date range on the TIMESTAMP parameter should be adjusted each month to match the reporting period, or the segmentation should be configured to use a dynamic time range.
  15. In the and then... section, click Add condition.
  16. From the dropdown list, select the marketingAgreement.turnOn event.
  17. Click the + where button and select the TIMESTAMP parameter.
  18. From the Choose operator dropdown, choose Custom and set the same date range as above.
  19. Set the completion window to Completed within 7 Days.
  20. Set the time range to Lifetime.
Configuration of the first condition group in Segment A
Configuration of the first condition group in Segment A

Second condition group:

  1. Click Add condition.
  2. Click Or to add an alternative condition group.
  3. Configure the same three events (form.submit, marketingAgreement.turnOn, profile.updated) but in a different order to account for customers who enabled the newsletter agreement before confirming their account.
  4. Apply the same filters, time ranges, and the 7-day completion window.
Configuration of the second condition group in Segment A
Configuration of the second condition group in Segment A

Configure Segment B


Segment B captures customers who registered through the store QR code and confirmed their account within 7 days, but already had the newsletter agreement from before the registration. This segment consists of two parts connected by an AND operator.

Part 1 — Performed action:

This part verifies that the customer submitted the registration form from a store link and confirmed their account within 7 days during the reporting period. Unlike Segment A, there is no marketingAgreement.turnOn event here — the newsletter opt-in happened earlier.

  1. Click Add segment to create Segment B.
  2. Click Add condition.
  3. From the dropdown list, select the form.submit event.
  4. Click the + where button and select the uri parameter.
  5. From the Choose operator dropdown, choose Contain and enter the registration page URL, for example www.example.com/create-account.
  6. Click the + where button and select the uri parameter again.
  7. From the Choose operator dropdown, choose Contain and enter the store identifier prefix, for example store_.
  8. Below the first condition, in the and then... section, click Add condition.
  9. From the dropdown list, select the profile.updated event.
  10. Click the + where button and select the activation parameter.
  11. From the Choose operator dropdown, choose Equal and enter true.
  12. Click the + where button and select the event aggregate created earlier.
  13. From the Choose operator dropdown, choose Contain and enter the store identifier prefix, for example store_.
  14. Click the + where button and select the TIMESTAMP parameter.
  15. From the Choose operator dropdown, choose Custom and set the date range to the reporting period (for example, 1 Mar 2026, 00:00 to 31 Mar 2026, 23:59).
  16. Set the completion window to Completed within 7 Days.
  17. Set the time range to Lifetime.

Part 2 — Has property (chronological check):

This part verifies that the customer's newsletter opt-in date (subscriptionDate attribute) is earlier than the account confirmation timestamp. This means the customer had already subscribed to the newsletter before completing the in-store registration.

  1. Below the performed action block, click Add condition and select Has property.
  2. Select the subscriptionDate attribute (a custom attribute storing the date when the customer opted in to the newsletter).
  3. From the Choose operator dropdown, choose Less than.
  4. As the value, select the profile aggregate for account confirmation created in the earlier step.
Configuration of Segment B with registration from store and pre-existing newsletter agreement
Configuration of Segment B with registration from store and pre-existing newsletter agreement

Finalize the segmentation


  1. Connect Segment A and Segment B using the OR operator (visible in the top-right corner of the conditions panel). A customer qualifies if they match either Segment A (all three actions within 7 days) or Segment B (registration + confirmation within 7 days, with a pre-existing newsletter agreement).
  2. Save the segmentation.

Create a report with registration counts per store


In this part of the process, create a report that returns the number of qualified registrations broken down by store and month. Before creating the report itself, you need to prepare several supporting analyses. The full list of elements to create in this section is:

  1. Metric — counts profiles matching the segmentation of qualified registrations.
  2. Aggregate: Newsletter agreement timestamp after in-store registration — returns the last marketingAgreement.turnOn timestamp for store-originated registrations.
  3. Aggregate: Account confirmation timestamp after in-store registration — returns the last profile.updated timestamp for confirmed accounts from store-originated registrations.
  4. Expression: TIMESTAMP — returns the earlier available timestamp (newsletter agreement or account confirmation) using IfNull.
  5. Aggregate: Last_store — returns the last store identifier from form.submit, filtered by store origin and timestamp.
  6. Expression: Data — extracts the registration date (year-month) from the timestamp for grouping by month.
  7. Expression: Data_Store — combines the registration date with the store identifier into a single dimension.
  8. Report — uses the metric and the three dimensions above.

Create a metric for counting qualified registrations


This metric counts all profiles that belong to the segmentation created in the previous step. It will be used as the base metric for the report.

  1. Go to Analytics icon Decision Hub > Metrics > New metric.
  2. Enter the name of the metric, for example Count of in-store loyalty registrations.
  3. As the metric kind, select Simple metric.
  4. As Type, select Profile.
  5. As Aggregator, select Count.
  6. Click the filter icon to add a profile filter.
  7. From the Choose filter dropdown, select the segmentation created in the previous step.
  8. From the Choose operator dropdown, choose Is true (Boolean).
  9. Confirm by clicking Apply.
  10. Save the metric.
Configuration of the metric counting profiles from the qualified registrations segmentation
Configuration of the metric counting profiles from the qualified registrations segmentation

Create an aggregate for newsletter agreement timestamp after in-store registration


This aggregate returns the last timestamp of the marketingAgreement.turnOn event for customers whose registration originated from a store link. It will be used in the expressions that serve as report dimensions.

  1. Go to Analytics icon Behavioral Data Hub > Live Aggregates > Create aggregate.
  2. As the aggregate type, select Profile.
  3. Enter a name for the aggregate, for example Newsletter agreement timestamp after in-store registration.
  4. Set Analyze profiles by to Last.
  5. From the Choose event dropdown list, select the marketingAgreement.turnOn event.
  6. As the event parameter, select TIMESTAMP.
  7. Click the + where button.
  8. From the Choose parameter dropdown list, select the event aggregate created in the first step (last URI from registration form submit).
  9. From the Choose operator dropdown, choose Contain (String).
  10. In the next field, enter the store identifier prefix, for example store_.
  11. Set the time range to Last 1 months before 1 months (this ensures the aggregate covers the previous month's data for reporting purposes).
  12. Save the aggregate.
Configuration of the aggregate for newsletter agreement timestamp after in-store registration
Configuration of the aggregate for newsletter agreement timestamp after in-store registration

Create an aggregate for account confirmation timestamp after in-store registration


This aggregate returns the last timestamp of the profile.updated event where the account was confirmed and the registration originated from a store link. It will be used as the fallback value in the TIMESTAMP expression — for customers who already had the newsletter agreement before the registration and therefore did not trigger the marketingAgreement.turnOn event during the process.

This aggregate uses the same event and conditions as the profile aggregate for account confirmation created earlier in the process, but its time range is set to Last 1 months to align with the monthly reporting cycle. You can reuse the same aggregate if the time range matches, or create a separate one for reporting purposes.

  1. Go to Behavioral Data Hub icon Behavioral Data Hub > Live Aggregates > Create aggregate.
  2. As the aggregate type, select Profile.
  3. Enter a name for the aggregate, for example Account confirmation timestamp after in-store registration.
  4. Set Analyze profiles by to Last.
  5. From the Choose event dropdown list, select the profile.updated event.
  6. As the event parameter, select TIMESTAMP.
  7. Click the + where button.
  8. From the Choose parameter dropdown list, select the activation parameter.
  9. From the Choose operator dropdown, choose Equal.
  10. In the next field, enter true.
  11. Click the + where button.
  12. From the Choose parameter dropdown list, select the event aggregate created in the first step (last URI from registration form submit).
  13. From the Choose operator dropdown, choose Contain.
  14. In the next field, enter the store identifier prefix, for example store_.
  15. Set the time range to Last 1 months.
  16. Save the aggregate.
Configuration of the aggregate for account confirmation timestamp after in-store registration
Configuration of the aggregate for account confirmation timestamp after in-store registration

Create the TIMESTAMP expression


This expression returns the earliest available timestamp from the registration process — either the newsletter agreement timestamp or the account confirmation timestamp. It uses the IfNull function: if the newsletter agreement timestamp is available, it is returned; otherwise, the account confirmation timestamp is used as a fallback. This expression will be referenced in the Last_store aggregate (to ensure the form submission occurred before the confirmation) and serves as a building block for other report dimensions.

  1. Go to Behavioral Data Hub icon Behavioral Data Hub > Expressions > New expression.
  2. Enter the name of the expression: TIMESTAMP.
  3. Set Expressions for to Attribute.
  4. Build the formula using the following structure:
    • IfNull - newsletter agreement timestamp aggregate, account confirmation timestamp aggregate
    • The first argument is the aggregate for the newsletter agreement timestamp after in-store registration (created in the previous step).
    • The second argument (fallback) is the profile aggregate for account confirmation created earlier.
  5. Save the expression.
Configuration of the TIMESTAMP expression
Configuration of the TIMESTAMP expression

Create the Last_store aggregate


This aggregate returns the last store identifier extracted from the form.submit event. It filters for registrations that came from a store link and whose timestamp is earlier than the registration confirmation timestamp (using the TIMESTAMP expression). It will be used directly as a report dimension and also within the Data_Store expression.

  1. Go to Behavioral Data Hub icon Behavioral Data Hub > Live Aggregates > Create aggregate.
  2. As the aggregate type, select Profile.
  3. Enter a name for the aggregate: Last_store.
  4. Set Analyze profiles by to Last.
  5. From the Choose event dropdown list, select the form.submit event.
  6. As the event parameter, select the parameter that contains the store identifier extracted from the URI (for example, fd:lastStore_).
  7. Click the + where button and select the uri parameter.
  8. From the Choose operator dropdown, choose Contain (String) and enter the registration page URL, for example www.example.com/create-account.
  9. Click the + where button and select the uri parameter again.
  10. From the Choose operator dropdown, choose Contain (String) and enter the store identifier prefix, for example store_.
  11. Click the + where button and select the TIMESTAMP parameter.
  12. From the Choose operator dropdown, choose Less than (Date).
  13. As the value, select the TIMESTAMP expression created in the previous step.
  14. Set the time range to Lifetime.
  15. Save the aggregate.
Configuration of the Last_store aggregate
Configuration of the Last_store aggregate

Create the Data expression


This expression returns the registration date (used as a report dimension to group results by month). It uses the Regexp and IfNull functions to extract the date from one of two aggregates: the newsletter agreement timestamp or the account confirmation timestamp — whichever is available first.

  1. Go to Behavioral Data Hub icon Behavioral Data Hub > Expressions > New expression.
  2. Enter the name of the expression: Data.
  3. Set Expressions for to Attribute.
  4. Build the formula using the following structure:
    • Regexp ( IfNull ( [newsletter agreement timestamp aggregate] , [account confirmation timestamp aggregate] ) , ...... )
    • The first argument of IfNull is the aggregate for the newsletter agreement timestamp after in-store registration (created in the step above).
    • The second argument (fallback) is the profile aggregate for account confirmation created earlier.
    • The Regexp pattern (......) extracts the date portion (for example, year-month) from the timestamp.
  5. Save the expression.
Configuration of the Data expression
Configuration of the Data expression

Create the Data_Store expression


This expression combines the registration date with the store identifier into a single dimension. It uses the Concat function to join the date (extracted via Regexp and IfNull, same logic as in Data) with a separator (_) and the Last_store aggregate.

  1. Go to Behavioral Data Hub icon Behavioral Data Hub > Expressions > New expression.
  2. Enter the name of the expression: Data_Store.
  3. Set Expressions for to Attribute.
  4. Build the formula using the following structure:
    • Concat ( Regexp ( IfNull ( [newsletter agreement timestamp aggregate] , [account confirmation timestamp aggregate] ) , ...... ) , Concat ( _ , Last_store ) )
    • The inner Regexp(IfNull(...)) portion is the same logic as in the Data expression — it extracts the date from the first available timestamp.
    • The outer Concat appends an underscore and the store identifier from the Last_store aggregate.
  5. Save the expression.
Configuration of the Data_Store expression
Configuration of the Data_Store expression

Configure the report


Now that all the required analyses are ready, create the report.

  1. Go to Analytics icon Decision Hub > Reports > New report.
  2. Enter the name of the report, for example Monthly in-store loyalty registrations by store.
  3. Click Choose metric and from the dropdown list, select the metric created above.
  4. From the Range dropdown list, select Top 1000.
  5. In the Dimension section, add the following dimensions:
    • Data_Store — the expression combining date and store identifier.
    • Data — the expression returning the registration date.
    • Last_store — the aggregate returning the store identifier.
  6. Set the Format to 19 000,7 for all dimensions.
  7. Enable the Show null values toggle.
  8. Set the time range to Lifetime.
  9. Save the report.
Configuration of the report with three dimensions
Configuration of the report with metric and three dimensions

Result: The report returns a table with the month of registration, the store name, and the number of customers who completed a full registration from that store.

To ensure the report always returns data for the previous month without manual adjustments, set all aggregates used in the segmentation and report dimensions to a relative time range such as Last month or Last 1 months before 1 months. This way, the segmentation and report will automatically shift to the correct period each month, and the only element that may still require a manual update is the custom TIMESTAMP range inside the segmentation conditions (if used).

What's next


Once the report is configured and saved, you can distribute the results in a way that best fits your business needs. Some common options include:

  • Email — use a workflow with the Send Email node to deliver the report results directly to the relevant stakeholders on a scheduled basis.
  • External systems (e.g. Microsoft SharePoint, Google Sheets) — use a workflow with Outgoing Integration nodes to authenticate with the external API, generate the report via the Synerise API, transform the data using Jinjava, and upload it to the target location.
  • Dashboards — add the report to an analytical dashboard for convenient, real-time access within Synerise.
  • CSV exportexport the report to a CSV file manually or automate the process via a workflow.

In each case, you can automate the delivery by creating a workflow triggered on a schedule (for example, on the first day of each month) that generates the report and sends or uploads the data to the desired destination.

Check the use case set up on the Synerise Demo workspace


You can check the configuration of each step directly in the Synerise Demo workspace:

If you’re our partner or client, you already have automatic access to the Synerise Demo workspace (1590), where you can explore all the configured elements of this use case and copy them to your workspace.

If you’re not a partner or client yet, we encourage you to fill out the contact form to schedule a meeting with our representatives. They’ll be happy to show you how our demo works and discuss how you can apply this use case in your business.

Read more


Canonical URL: https://hub.synerise.com/use-cases/store-competition-use-case