Google Analytics API . management . webPropertyAdWordsLinks

Instance Methods

close()

Close httplib2 connections.

delete(accountId, webPropertyId, webPropertyAdWordsLinkId)

Deletes a web property-Google Ads link.

get(accountId, webPropertyId, webPropertyAdWordsLinkId)

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

insert(accountId, webPropertyId, body=None)

Creates a webProperty-Google Ads link.

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

Lists webProperty-Google Ads links for a given web property.

patch(accountId, webPropertyId, webPropertyAdWordsLinkId, body=None)

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

update(accountId, webPropertyId, webPropertyAdWordsLinkId, body=None)

Updates an existing webProperty-Google Ads link.

Method Details

close()
Close httplib2 connections.
delete(accountId, webPropertyId, webPropertyAdWordsLinkId)
Deletes a web property-Google Ads link.

Args:
  accountId: string, ID of the account which the given web property belongs to. (required)
  webPropertyId: string, Web property ID to delete the Google Ads link for. (required)
  webPropertyAdWordsLinkId: string, Web property Google Ads link ID. (required)
get(accountId, webPropertyId, webPropertyAdWordsLinkId)
Returns a web property-Google Ads 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 Google Ads link for. (required)
  webPropertyAdWordsLinkId: string, Web property-Google Ads link ID. (required)

Returns:
  An object of the form:

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

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


Returns:
  An object of the form:

    { # JSON template for Analytics Entity Google Ads Link.
    "name": "A String", # Name of the link. This field is required when creating a Google Ads link.
    "adWordsAccounts": [ # A list of Google Ads client accounts. These cannot be MCC accounts. This field is required when creating a Google Ads link. It cannot be empty.
      { # JSON template for an Google Ads account.
        "customerId": "A String", # Customer ID. This field is required when creating a Google Ads link.
        "kind": "analytics#adWordsAccount", # Resource type for Google Ads account.
        "autoTaggingEnabled": True or False, # True if auto-tagging is enabled on the Google Ads account. Read-only after the insert operation.
      },
    ],
    "selfLink": "A String", # URL link for this Google Analytics - Google Ads link.
    "profileIds": [ # IDs of linked Views (Profiles) represented as strings.
      "A String",
    ],
    "kind": "analytics#entityAdWordsLink", # Resource type for entity Google Ads link.
    "entity": { # Web property being linked.
      "webPropertyRef": { # JSON template for a web property reference.
        "internalWebPropertyId": "A String", # Internal ID for this web property.
        "href": "A String", # Link for this web property.
        "kind": "analytics#webPropertyRef", # Analytics web property reference.
        "id": "A String", # Web property ID of the form UA-XXXXX-YY.
        "accountId": "A String", # Account ID to which this web property belongs.
        "name": "A String", # Name of this web property.
      },
    },
    "id": "A String", # Entity Google Ads link ID
  }
list(accountId, webPropertyId, max_results=None, start_index=None)
Lists webProperty-Google Ads 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 Google Ads links for. (required)
  max_results: integer, The maximum number of webProperty-Google Ads links to include in this response.
  start_index: integer, An index of the first webProperty-Google Ads link to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.

Returns:
  An object of the form:

    { # An entity Google Ads link collection provides a list of GA-Google Ads links Each resource in this collection corresponds to a single link.
    "kind": "analytics#entityAdWordsLinks", # Collection type.
    "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.
    "items": [ # A list of entity Google Ads links.
      { # JSON template for Analytics Entity Google Ads Link.
        "name": "A String", # Name of the link. This field is required when creating a Google Ads link.
        "adWordsAccounts": [ # A list of Google Ads client accounts. These cannot be MCC accounts. This field is required when creating a Google Ads link. It cannot be empty.
          { # JSON template for an Google Ads account.
            "customerId": "A String", # Customer ID. This field is required when creating a Google Ads link.
            "kind": "analytics#adWordsAccount", # Resource type for Google Ads account.
            "autoTaggingEnabled": True or False, # True if auto-tagging is enabled on the Google Ads account. Read-only after the insert operation.
          },
        ],
        "selfLink": "A String", # URL link for this Google Analytics - Google Ads link.
        "profileIds": [ # IDs of linked Views (Profiles) represented as strings.
          "A String",
        ],
        "kind": "analytics#entityAdWordsLink", # Resource type for entity Google Ads link.
        "entity": { # Web property being linked.
          "webPropertyRef": { # JSON template for a web property reference.
            "internalWebPropertyId": "A String", # Internal ID for this web property.
            "href": "A String", # Link for this web property.
            "kind": "analytics#webPropertyRef", # Analytics web property reference.
            "id": "A String", # Web property ID of the form UA-XXXXX-YY.
            "accountId": "A String", # Account ID to which this web property belongs.
            "name": "A String", # Name of this web property.
          },
        },
        "id": "A String", # Entity Google Ads link ID
      },
    ],
    "previousLink": "A String", # Previous link for this Google Ads link collection.
    "totalResults": 42, # The total number of results for the query, regardless of the number of results in the response.
    "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 Google Ads link collection.
  }
patch(accountId, webPropertyId, webPropertyAdWordsLinkId, body=None)
Updates an existing webProperty-Google Ads 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 Google Ads link for. (required)
  webPropertyAdWordsLinkId: string, Web property-Google Ads link ID. (required)
  body: object, The request body.
    The object takes the form of:

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


Returns:
  An object of the form:

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

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

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


Returns:
  An object of the form:

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