1<?php
2
3/**
4 * This interface is implemented by internal phplist classes.
5 * A plugin can also implement this interface to customise the parameters for analytic tracking, such as Google Analytics or Matomo.
6 */
7interface AnalyticsQuery
8{
9    /**
10     * Provide the query parameters to be added to a URL.
11     *
12     * @param string $emailFormat HTML or text
13     * @param array  $messageData
14     *
15     * @return array query parameters as key => value
16     */
17    public function trackingParameters($emailFormat, $messageData);
18
19    /**
20     * Provide the query parameters that can be edited on the Finish tab.
21     *
22     * @param array $messageData
23     *
24     * @return array query parameters as key => default value
25     */
26    public function editableParameters($messageData);
27
28    /**
29     * Provide the prefix of the tracking parameters.
30     * This is used to remove existing tracking parameters from a URL.
31     *
32     * @return string
33     */
34    public function prefix();
35}
36