java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
com.aoapps.ant.tasks.InsertGoogleAnalyticsTrackingTask
- All Implemented Interfaces:
Cloneable
Ant task that invokes
InsertGoogleAnalyticsTracking.addTrackingCodeToZip(java.io.File, java.lang.String).- Author:
- AO Industries, Inc.
-
Field Summary
Fields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute()CallsInsertGoogleAnalyticsTracking.addTrackingCodeToZip(java.io.File, java.lang.String)with the given ZIP file while logging toTask.log(java.lang.String, int).voidThe ZIP file to add Google Analytics tracking codes to.voidsetGoogleAnalyticsTrackingId(String googleAnalyticsTrackingId) The modern Google Analytics Global Site Tag tracking ID, which will currently be the Google Analytics 4 (GA4) Measurement ID.Methods inherited from class org.apache.tools.ant.Task
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskTypeMethods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
-
Constructor Details
-
InsertGoogleAnalyticsTrackingTask
public InsertGoogleAnalyticsTrackingTask()
-
-
Method Details
-
setFile
The ZIP file to add Google Analytics tracking codes to. Must exist and be a ZIP file. -
setGoogleAnalyticsTrackingId
The modern Google Analytics Global Site Tag tracking ID, which will currently be the Google Analytics 4 (GA4) Measurement ID.- Parameters:
googleAnalyticsTrackingId- No script will be written whennullor empty (after trimming)
-
execute
CallsInsertGoogleAnalyticsTracking.addTrackingCodeToZip(java.io.File, java.lang.String)with the given ZIP file while logging toTask.log(java.lang.String, int).- Overrides:
executein classTask- Throws:
BuildException
-
