Select a specific Location
In this guide we're going to see how you can select a specific location when creating a new analysis.
If you're not familiar with GraphQL, please have a look at its dedicated section in this documentation.
The AdSecure crawler is able to simulate in a different way a user that is going to interact with the web content you want to analyse. One of the key points of this feature is the selection of a specific location.
In this guide, we're going to configure our analysis in order to be connected through a mobile connection in the United States.
Prerequisites
Before starting this guide, please be sure that you're ready to use our service by following the steps illustrated in the Quickstart section.
Simple case
At AdSecure, a location is a combination of 3 parameters:
- The location's
countrywhich represent the ISO 3 code of a country. - The connection's
typeyou want to use. It could take one of the following values:STANDARDfor a connection issued by a data-center.RESIDENTIALfor a connection issued by a private computer.MOBILEfor a connection issued by a mobile device.
- The
providerwhich represent the connection's provider that is going to be used.
The entire list of
Locationis available and can be retrieved by running the following query:query { locations(first: 1000) { nodes { provider country name type enabled } } }
The next steps are quite similar to the one that we've done previous in the in the First Analysis guide. From this previous example, we just need to fill the input.location field:
Query
mutation {
createAnalysis(input: {
content: "https://examples.adsecure.com/simple",
location: {
country: USA,
type: RESIDENTIAL,
provider: "OTHER"
}
}) {
id
location {
country
type
provider
}
}
}
Response
{
"data": {
"createAnalysis": {
"id": "YW5hbHlzaXN8YThiYzk0M2ItNTY3ZS00NzA5LWIwOWItMTI1YmMzNGMxMjUwfDIwMTgtMDktMDI=",
"location": {
"country": "USA",
"type": "RESIDENTIAL",
"provider": "OTHER"
}
}
}
}
The AdSecure crawler is going to be connected to a mobile device located in the United States with the AT&T service.