Google Analytics API . management . webPropertyAdWordsLinks

Instance Methods

delete(accountId, webPropertyId, webPropertyAdWordsLinkId)

Deletes a web property-AdWords link.

get(accountId, webPropertyId, webPropertyAdWordsLinkId)

Returns a web property-AdWords link to which the user has access.

insert(accountId, webPropertyId, body)

Creates a webProperty-AdWords link.

list(accountId, webPropertyId, max_results=None, start_index=None)

Lists webProperty-AdWords links for a given web property.

patch(accountId, webPropertyId, webPropertyAdWordsLinkId, body)

Updates an existing webProperty-AdWords link. This method supports patch semantics.

update(accountId, webPropertyId, webPropertyAdWordsLinkId, body)

Updates an existing webProperty-AdWords link.

Method Details

delete(accountId, webPropertyId, webPropertyAdWordsLinkId)
Deletes a web property-AdWords link.

Args:
  accountId: string, ID of the account which the given web property belongs to. (required)
  webPropertyId: string, Web property ID to delete the AdWords link for. (required)
  webPropertyAdWordsLinkId: string, Web property AdWords link ID. (required)
get(accountId, webPropertyId, webPropertyAdWordsLinkId)
Returns a web property-AdWords link to which the user has access.

Args:
  accountId: string, ID of the account which the given web property belongs to. (required)
  webPropertyId: string, Web property ID to retrieve the AdWords link for. (required)
  webPropertyAdWordsLinkId: string, Web property-AdWords link ID. (required)

Returns:
  An object of the form:

    { # JSON template for Analytics Entity AdWords Link.
      "kind": "analytics#entityAdWordsLink", # Resource type for entity AdWords link.
      "name": "A String", # Name of the link. This field is required when creating an AdWords link.
      "adWordsAccounts": [ # A list of AdWords client accounts. These cannot be MCC accounts. This field is required when creating an AdWords link. It cannot be empty.
        { # JSON template for an AdWords account.
          "kind": "analytics#adWordsAccount", # Resource type for AdWords account.
          "customerId": "A String", # Customer ID. This field is required when creating an AdWords link.
          "autoTaggingEnabled": True or False, # True if auto-tagging is enabled on the AdWords account. Read-only after the insert operation.
        },
      ],
      "entity": { # Web property being linked.
        "webPropertyRef": { # JSON template for a web property reference.
          "kind": "analytics#webPropertyRef", # Analytics web property reference.
          "name": "A String", # Name of this web property.
          "internalWebPropertyId": "A String", # Internal ID for this web property.
          "href": "A String", # Link for this web property.
          "id": "A String", # Web property ID of the form UA-XXXXX-YY.
          "accountId": "A String", # Account ID to which this web property belongs.
        },
      },
      "profileIds": [ # IDs of linked Views (Profiles) represented as strings.
        "A String",
      ],
      "id": "A String", # Entity AdWords link ID
      "selfLink": "A String", # URL link for this Google Analytics - Google AdWords link.
    }
insert(accountId, webPropertyId, body)
Creates a webProperty-AdWords link.

Args:
  accountId: string, ID of the Google Analytics account to create the link for. (required)
  webPropertyId: string, Web property ID to create the link for. (required)
  body: object, The request body. (required)
    The object takes the form of:

{ # JSON template for Analytics Entity AdWords Link.
    "kind": "analytics#entityAdWordsLink", # Resource type for entity AdWords link.
    "name": "A String", # Name of the link. This field is required when creating an AdWords link.
    "adWordsAccounts": [ # A list of AdWords client accounts. These cannot be MCC accounts. This field is required when creating an AdWords link. It cannot be empty.
      { # JSON template for an AdWords account.
        "kind": "analytics#adWordsAccount", # Resource type for AdWords account.
        "customerId": "A String", # Customer ID. This field is required when creating an AdWords link.
        "autoTaggingEnabled": True or False, # True if auto-tagging is enabled on the AdWords account. Read-only after the insert operation.
      },
    ],
    "entity": { # Web property being linked.
      "webPropertyRef": { # JSON template for a web property reference.
        "kind": "analytics#webPropertyRef", # Analytics web property reference.
        "name": "A String", # Name of this web property.
        "internalWebPropertyId": "A String", # Internal ID for this web property.
        "href": "A String", # Link for this web property.
        "id": "A String", # Web property ID of the form UA-XXXXX-YY.
        "accountId": "A String", # Account ID to which this web property belongs.
      },
    },
    "profileIds": [ # IDs of linked Views (Profiles) represented as strings.
      "A String",
    ],
    "id": "A String", # Entity AdWords link ID
    "selfLink": "A String", # URL link for this Google Analytics - Google AdWords link.
  }


Returns:
  An object of the form:

    { # JSON template for Analytics Entity AdWords Link.
      "kind": "analytics#entityAdWordsLink", # Resource type for entity AdWords link.
      "name": "A String", # Name of the link. This field is required when creating an AdWords link.
      "adWordsAccounts": [ # A list of AdWords client accounts. These cannot be MCC accounts. This field is required when creating an AdWords link. It cannot be empty.
        { # JSON template for an AdWords account.
          "kind": "analytics#adWordsAccount", # Resource type for AdWords account.
          "customerId": "A String", # Customer ID. This field is required when creating an AdWords link.
          "autoTaggingEnabled": True or False, # True if auto-tagging is enabled on the AdWords account. Read-only after the insert operation.
        },
      ],
      "entity": { # Web property being linked.
        "webPropertyRef": { # JSON template for a web property reference.
          "kind": "analytics#webPropertyRef", # Analytics web property reference.
          "name": "A String", # Name of this web property.
          "internalWebPropertyId": "A String", # Internal ID for this web property.
          "href": "A String", # Link for this web property.
          "id": "A String", # Web property ID of the form UA-XXXXX-YY.
          "accountId": "A String", # Account ID to which this web property belongs.
        },
      },
      "profileIds": [ # IDs of linked Views (Profiles) represented as strings.
        "A String",
      ],
      "id": "A String", # Entity AdWords link ID
      "selfLink": "A String", # URL link for this Google Analytics - Google AdWords link.
    }
list(accountId, webPropertyId, max_results=None, start_index=None)
Lists webProperty-AdWords links for a given web property.

Args:
  accountId: string, ID of the account which the given web property belongs to. (required)
  webPropertyId: string, Web property ID to retrieve the AdWords links for. (required)
  max_results: integer, The maximum number of webProperty-AdWords links to include in this response.
  start_index: integer, An index of the first webProperty-AdWords link to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.

Returns:
  An object of the form:

    { # An entity AdWords link collection provides a list of GA-AdWords links Each resource in this collection corresponds to a single link.
    "kind": "analytics#entityAdWordsLinks", # Collection type.
    "items": [ # A list of entity AdWords links.
      { # JSON template for Analytics Entity AdWords Link.
          "kind": "analytics#entityAdWordsLink", # Resource type for entity AdWords link.
          "name": "A String", # Name of the link. This field is required when creating an AdWords link.
          "adWordsAccounts": [ # A list of AdWords client accounts. These cannot be MCC accounts. This field is required when creating an AdWords link. It cannot be empty.
            { # JSON template for an AdWords account.
              "kind": "analytics#adWordsAccount", # Resource type for AdWords account.
              "customerId": "A String", # Customer ID. This field is required when creating an AdWords link.
              "autoTaggingEnabled": True or False, # True if auto-tagging is enabled on the AdWords account. Read-only after the insert operation.
            },
          ],
          "entity": { # Web property being linked.
            "webPropertyRef": { # JSON template for a web property reference.
              "kind": "analytics#webPropertyRef", # Analytics web property reference.
              "name": "A String", # Name of this web property.
              "internalWebPropertyId": "A String", # Internal ID for this web property.
              "href": "A String", # Link for this web property.
              "id": "A String", # Web property ID of the form UA-XXXXX-YY.
              "accountId": "A String", # Account ID to which this web property belongs.
            },
          },
          "profileIds": [ # IDs of linked Views (Profiles) represented as strings.
            "A String",
          ],
          "id": "A String", # Entity AdWords link ID
          "selfLink": "A String", # URL link for this Google Analytics - Google AdWords link.
        },
    ],
    "itemsPerPage": 42, # The maximum number of entries the response can contain, regardless of the actual number of entries returned. Its value ranges from 1 to 1000 with a value of 1000 by default, or otherwise specified by the max-results query parameter.
    "previousLink": "A String", # Previous link for this AdWords link collection.
    "startIndex": 42, # The starting index of the entries, which is 1 by default or otherwise specified by the start-index query parameter.
    "nextLink": "A String", # Next link for this AdWords link collection.
    "totalResults": 42, # The total number of results for the query, regardless of the number of results in the response.
  }
patch(accountId, webPropertyId, webPropertyAdWordsLinkId, body)
Updates an existing webProperty-AdWords link. This method supports patch semantics.

Args:
  accountId: string, ID of the account which the given web property belongs to. (required)
  webPropertyId: string, Web property ID to retrieve the AdWords link for. (required)
  webPropertyAdWordsLinkId: string, Web property-AdWords link ID. (required)
  body: object, The request body. (required)
    The object takes the form of:

{ # JSON template for Analytics Entity AdWords Link.
    "kind": "analytics#entityAdWordsLink", # Resource type for entity AdWords link.
    "name": "A String", # Name of the link. This field is required when creating an AdWords link.
    "adWordsAccounts": [ # A list of AdWords client accounts. These cannot be MCC accounts. This field is required when creating an AdWords link. It cannot be empty.
      { # JSON template for an AdWords account.
        "kind": "analytics#adWordsAccount", # Resource type for AdWords account.
        "customerId": "A String", # Customer ID. This field is required when creating an AdWords link.
        "autoTaggingEnabled": True or False, # True if auto-tagging is enabled on the AdWords account. Read-only after the insert operation.
      },
    ],
    "entity": { # Web property being linked.
      "webPropertyRef": { # JSON template for a web property reference.
        "kind": "analytics#webPropertyRef", # Analytics web property reference.
        "name": "A String", # Name of this web property.
        "internalWebPropertyId": "A String", # Internal ID for this web property.
        "href": "A String", # Link for this web property.
        "id": "A String", # Web property ID of the form UA-XXXXX-YY.
        "accountId": "A String", # Account ID to which this web property belongs.
      },
    },
    "profileIds": [ # IDs of linked Views (Profiles) represented as strings.
      "A String",
    ],
    "id": "A String", # Entity AdWords link ID
    "selfLink": "A String", # URL link for this Google Analytics - Google AdWords link.
  }


Returns:
  An object of the form:

    { # JSON template for Analytics Entity AdWords Link.
      "kind": "analytics#entityAdWordsLink", # Resource type for entity AdWords link.
      "name": "A String", # Name of the link. This field is required when creating an AdWords link.
      "adWordsAccounts": [ # A list of AdWords client accounts. These cannot be MCC accounts. This field is required when creating an AdWords link. It cannot be empty.
        { # JSON template for an AdWords account.
          "kind": "analytics#adWordsAccount", # Resource type for AdWords account.
          "customerId": "A String", # Customer ID. This field is required when creating an AdWords link.
          "autoTaggingEnabled": True or False, # True if auto-tagging is enabled on the AdWords account. Read-only after the insert operation.
        },
      ],
      "entity": { # Web property being linked.
        "webPropertyRef": { # JSON template for a web property reference.
          "kind": "analytics#webPropertyRef", # Analytics web property reference.
          "name": "A String", # Name of this web property.
          "internalWebPropertyId": "A String", # Internal ID for this web property.
          "href": "A String", # Link for this web property.
          "id": "A String", # Web property ID of the form UA-XXXXX-YY.
          "accountId": "A String", # Account ID to which this web property belongs.
        },
      },
      "profileIds": [ # IDs of linked Views (Profiles) represented as strings.
        "A String",
      ],
      "id": "A String", # Entity AdWords link ID
      "selfLink": "A String", # URL link for this Google Analytics - Google AdWords link.
    }
update(accountId, webPropertyId, webPropertyAdWordsLinkId, body)
Updates an existing webProperty-AdWords link.

Args:
  accountId: string, ID of the account which the given web property belongs to. (required)
  webPropertyId: string, Web property ID to retrieve the AdWords link for. (required)
  webPropertyAdWordsLinkId: string, Web property-AdWords link ID. (required)
  body: object, The request body. (required)
    The object takes the form of:

{ # JSON template for Analytics Entity AdWords Link.
    "kind": "analytics#entityAdWordsLink", # Resource type for entity AdWords link.
    "name": "A String", # Name of the link. This field is required when creating an AdWords link.
    "adWordsAccounts": [ # A list of AdWords client accounts. These cannot be MCC accounts. This field is required when creating an AdWords link. It cannot be empty.
      { # JSON template for an AdWords account.
        "kind": "analytics#adWordsAccount", # Resource type for AdWords account.
        "customerId": "A String", # Customer ID. This field is required when creating an AdWords link.
        "autoTaggingEnabled": True or False, # True if auto-tagging is enabled on the AdWords account. Read-only after the insert operation.
      },
    ],
    "entity": { # Web property being linked.
      "webPropertyRef": { # JSON template for a web property reference.
        "kind": "analytics#webPropertyRef", # Analytics web property reference.
        "name": "A String", # Name of this web property.
        "internalWebPropertyId": "A String", # Internal ID for this web property.
        "href": "A String", # Link for this web property.
        "id": "A String", # Web property ID of the form UA-XXXXX-YY.
        "accountId": "A String", # Account ID to which this web property belongs.
      },
    },
    "profileIds": [ # IDs of linked Views (Profiles) represented as strings.
      "A String",
    ],
    "id": "A String", # Entity AdWords link ID
    "selfLink": "A String", # URL link for this Google Analytics - Google AdWords link.
  }


Returns:
  An object of the form:

    { # JSON template for Analytics Entity AdWords Link.
      "kind": "analytics#entityAdWordsLink", # Resource type for entity AdWords link.
      "name": "A String", # Name of the link. This field is required when creating an AdWords link.
      "adWordsAccounts": [ # A list of AdWords client accounts. These cannot be MCC accounts. This field is required when creating an AdWords link. It cannot be empty.
        { # JSON template for an AdWords account.
          "kind": "analytics#adWordsAccount", # Resource type for AdWords account.
          "customerId": "A String", # Customer ID. This field is required when creating an AdWords link.
          "autoTaggingEnabled": True or False, # True if auto-tagging is enabled on the AdWords account. Read-only after the insert operation.
        },
      ],
      "entity": { # Web property being linked.
        "webPropertyRef": { # JSON template for a web property reference.
          "kind": "analytics#webPropertyRef", # Analytics web property reference.
          "name": "A String", # Name of this web property.
          "internalWebPropertyId": "A String", # Internal ID for this web property.
          "href": "A String", # Link for this web property.
          "id": "A String", # Web property ID of the form UA-XXXXX-YY.
          "accountId": "A String", # Account ID to which this web property belongs.
        },
      },
      "profileIds": [ # IDs of linked Views (Profiles) represented as strings.
        "A String",
      ],
      "id": "A String", # Entity AdWords link ID
      "selfLink": "A String", # URL link for this Google Analytics - Google AdWords link.
    }