|
@@ -243,10 +243,10 @@ public class GTMService {
|
|
GTMTriggerDTO createTrigger(String workspaceResourceName) throws DataException {
|
|
GTMTriggerDTO createTrigger(String workspaceResourceName) throws DataException {
|
|
try {
|
|
try {
|
|
Trigger trigger = new Trigger();
|
|
Trigger trigger = new Trigger();
|
|
|
|
+ trigger.setName("Page View Trigger");
|
|
// See
|
|
// See
|
|
// https://developers.google.com/tag-platform/tag-manager/api/v2/reference/accounts/containers/workspaces/triggers#type
|
|
// https://developers.google.com/tag-platform/tag-manager/api/v2/reference/accounts/containers/workspaces/triggers#type
|
|
trigger.setType("pageview");
|
|
trigger.setType("pageview");
|
|
- trigger.setName("Page View Trigger");
|
|
|
|
|
|
|
|
Trigger createdTrigger =
|
|
Trigger createdTrigger =
|
|
tagManager
|
|
tagManager
|
|
@@ -277,7 +277,8 @@ public class GTMService {
|
|
}
|
|
}
|
|
|
|
|
|
@VisibleForTesting
|
|
@VisibleForTesting
|
|
- void createGoogleTag(String workspaceResourceName, String googleTagId) throws DataException {
|
|
|
|
|
|
+ void createGoogleTag(String workspaceResourceName, String triggerId, String googleTagId)
|
|
|
|
+ throws DataException {
|
|
try {
|
|
try {
|
|
Parameter parameter = new Parameter();
|
|
Parameter parameter = new Parameter();
|
|
// See
|
|
// See
|
|
@@ -287,8 +288,10 @@ public class GTMService {
|
|
parameter.setValue(googleTagId);
|
|
parameter.setValue(googleTagId);
|
|
|
|
|
|
Tag tag = new Tag();
|
|
Tag tag = new Tag();
|
|
|
|
+ tag.setName("Google Tag - PV");
|
|
tag.setType("googtag");
|
|
tag.setType("googtag");
|
|
tag.setParameter(Collections.singletonList(parameter));
|
|
tag.setParameter(Collections.singletonList(parameter));
|
|
|
|
+ tag.setFiringTriggerId(Collections.singletonList(triggerId));
|
|
|
|
|
|
Tag createdTag =
|
|
Tag createdTag =
|
|
tagManager
|
|
tagManager
|