Skip to main content

goalCreate

Creates a goal on a site and returns only its id; fetch the full goal with goalDetail. Every trigger filter is validated before anything is saved, so one invalid filter creates nothing. On success the account's tracking script is marked for regeneration and a page screenshot for the goal thumbnail is requested in the background. Requires goal create access.

goalCreate(
params: GoalCreateParams!
): GoalMutationResult!

Arguments​

goalCreate.params ● GoalCreateParams! non-null input​

Site, name, and triggers of the new goal.

Type​

GoalMutationResult object​

Id of the goal changed by goalCreate, goalEdit, goalRename, or goalDelete. Fetch the full goal with goalDetail, or with goalRef after deletion.