12.8. Parameter Example: Google Maps Link
In this lesson, we'll dive into an exciting example that demonstrates the use of text-based parameters. We'll create a text-based parameter that allows users to input an address and generates a Google Maps link based on the entered address.
Learning Objectives
- Understand the purpose and use of text-based parameters in Looker Studio.
- Create a text-based parameter with specific configurations.
- Use the HYPERLINK() and CONCAT() functions to generate dynamic links based on user input.
- Apply the concepts learned to real-world scenarios and use cases.
- Finalize user input and understand the importance of clicking outside the input box.
Creating a Text-Based Parameter
Creating a text-based parameter is simple and follows a similar process as other parameters. In this example, we'll create a parameter called address. The configuration for this parameter is as follows:
- Name: address
- Type: text
- Default value: Enter your address
The data type for the address parameter is text, and we've set it to accept any value. You could also set the text parameter to have a list of values, such as countries, cities, departments, or sales managers. You can then assign this list to a dropdown control.
Using the Address Parameter
When the user enters an address, we can use the entered text value to generate a Google Maps link. Keep in mind that you can enter any text that Google Maps can interpret, such as a famous landmark or a specific street address.
Note: The entered address will not be finalized until you click outside of the input box.
To create a link, you can use the HYPERLINK()
function along with the CONCAT()
function. In this example, we use the following formula:
HYPERLINK(CONCAT("https://maps.google.com?q=", [address]), "Google Maps Link")
This formula concatenates "https://maps.google.com?q=" with the user-provided address and sets the title as "Google Maps Link."
Example use case: Some users may want to create links to specific marketing campaigns by entering the campaign name. If you know your URL structure for the tool you use to manage campaigns, you can construct a link like the one demonstrated in this lesson.
β 12.2. Use Cases for Parameters
β 12.3. Properties of Parameters
β 12.4. Parameters: From Creation to Visualization
β 12.5. Parameters: Range of Values
β 12.6. Parameters on Charts
β 12.8. Parameter Example: Google Maps Link
β 12.9. Parameter Example: UTM Generator
β 12.10. Parameter Example: Dynamic Dimension
β 12.11. Parameter Example: Dynamic Metric
β 12.12. Parameter Example: Dynamic Comparison
β 12.13. Parameter Example: Dynamic Filter Controls
β 12.14. Parameter Example: Projection & Custom Calculators
β 12.15. App View
β 12.16. Parameters in Dynamic SQL for BigQuery
π© Receive my weekly Looker Studio tips
π₯Β Subscribe to my YouTube channel
π Connect with me on LinkedIn