ga_users_delete_linkid | R Documentation |
The linkId
is in the form of the accountId/webPropertyId/viewId colon separated from a link unique Id.
Delete user access by supplying the linkId for that user at the level they have been given access. It won't work to delete user links at account level if they have been assigned at web property or view level - you will need to get the linkId for that level instead. e.g. a user needs permissions.local
to be non-NULL to be deleted at that level. The parameter check
will do this check before deletion and throw an error if they can not be deleted. Set this to check=FALSE
to suppress this behaviour.
If you supply more than one linkId
, then batch processing will be applied. Batching has special rules that give you 30 operations for the cost of one API call against your quota. When batching you will only get a TRUE
result on successful batch, but individual linkId
s may have failed. Check via ga_users_list afterwards and try to delete individual linkIds to get more descriptive error messages.
ga_users_delete_linkid(
linkId,
accountId,
webPropertyId = NULL,
viewId = NULL,
check = TRUE
)
linkId |
The linkId(s) that is available using ga_users_list e.g. |
accountId |
Account Id |
webPropertyId |
Web Property Id - set to NULL to operate on account level only |
viewId |
viewId - set to NULL to operate on webProperty level only |
check |
If the default |
TRUE if the deletion is successful, an error if not.
Other User management functions:
ga_users_add()
,
ga_users_delete()
,
ga_users_list()
,
ga_users_update()
## Not run:
library(googleAnalyticsR)
ga_auth()
# get the linkId for the user you want to delete
ga_users_list(47480439, webPropertyId = "UA-47480439-2", viewId = 81416156)
ga_users_delete_linkid("81416156:114834495587136933146",
accountId = 47480439,
webPropertyId = "UA-47480439-2",
viewId = 81416156)
# check its gone
ga_users_list(47480439, webPropertyId = "UA-47480439-2", viewId = 81416156)
# can only delete at level user has access, the above deletion woud have failed if via:
ga_users_delete_linkid("47480439:114834495587136933146", 47480439)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.