Problem:
We need to add the same campaign fields (dataLayer) to the Campaign pages (CPP). A few fields should be mandatory (campaign, basket, scope).
The dataLayer.push with campaign values should be injected on the <head> before Google Tag Manager code.
Note: The previous ticket has already applied those fields to the default planet 4 pages backend is related to the previous ticket PLANET-3324
Description:
1. Create campaign fields on the campaign page (content type) backend.
*If possible, the source list for those dropdown values should editable from the same place on the code (for both types of pages). If we need to update this in future, we could do it from only one place.
- Campaign autocomplete field [with this list
*Note: Please check the requestPLANET-3378. This field should be a <datalist> or an autocomplete field, to enable the users to select a standard value or input their own.
- Basket [dropdown field with this list
- Scope [dropdown field with this list
- Department [text input]
3. Make the fields Campaign, Basket and Scope required
4. The dataLayer.push code should capture the values defined in the fields above.
Important: the dataLayer code needs to be injected on the <head> before the GTM code.
dataLayer.push({
'gCampaign' : '[value defined in Campaign field]',
'gBasket' : '[value defined in Basket field]',
'gScope': '[value defined in Scope field]',
'gDepartment': '[value defined in Department field]',
{color:#205081}});
User stories
- As a web editor, I want to be able to define the campaign standards when creating/editing a default page or a campaign page
- As a data analyst, I want to be able to track the performance of any page that could have a form block through a set of standards (campaign, basket, scope)
- As an admin, I want to make mandatory for web editors to define the campaign standards when creating a new campaign page (cpp)
- relates to
-
PLANET-3956 CPP - Add new value and reorganize the Campaign Standards (dataLayer) dropdown values
- CLOSED