Google Universal Analytics - Should campaign parameters be set manually? - universal-analytics

We use Google Universal Analytics on site example.com.
I've generated my site campaign URL : http://example.com/?utm_source=newsletter&utm_medium=email&utm_campaign=partnership
I want GA to be notified that URL was accessed with campaign parameters. How should I do it ? Is it automatically done ? I can't find mention of "utm" parameters in Universal documentation.
I think I should set each campaign parameter cf. https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference
ga('set', 'campaignName', '(direct)');
ga('set', 'campaignSource', '(direct)');
ga('set', 'campaignMedium', 'organic');
ga('set', 'campaignId', 'ID');
and then :
ga('send', 'pageview');
It seems very much "complicated" for something that should be a common task when GA/campaign are used.
Any idea ?
Thanks for your help,
Philip.

Once you have created your link with the utm parameters, tracking is done automatically. You can find the reports under Acquisition / Campaign.

After more testing : I have a source page which includes a destination iframe. Source page has GA and Universal enabled. Destination has only Universal.
Source URL contains campaign utm parameters, iframe URL is build with Universal decorate method, which gives : "http://myiframe/?_ga=xxxxx" (notice there's no utm parameters in iframe URL). Iframe actually sends campaign information, as it can be seen with Universal debug mode enabled in browser console "sent beacon" log.
Whath I understand is : it work automatically with decorate method if source URL contains utm parameters, but if it's not the case, information is lost in destination iframe, unless you manually add those campaingn parameters to iframe URL like : "http://myiframe/?_ga=xxxxx&_utmz=xxxxx". Campaign information is stored by GA in source cookie, but not transfered to destination.
Not sure, but one convenient way to add utm parameters to iframe URL (so, if there are not already in source URL), could be to use Universal decorate and GA pageTracker._getLinkerUrl to get all needed information.

Related

Redirect URL using Firebase Dynamic / Deep Links is losing query parameters

In my Flutter (Android/iOS) app I am using Firebase Dynamic Links for Patreon.com OAuth2 apis.
My dynamic link is https://myappname.page.link/patreon
The deep link is https://myappname.net/patreon
Patreon is using the https://myappname.page.link/patreon as a redirect_url , and is supposed to append some parameters to it, so it looks like
https://myappname.net/patreon?code=xxx
However, all I receive inside my app is the naked url https://myappname.net/patreon
There are no parameters attached to it.
So how can I tell Firebase to preserve the query parameters Patreon is attaching to the redirect_url?
As an alternate question, is there a better way to listen for incoming response inside of a Flutter app, without the use of Dynamic Links?
You loose all parameters by using that.
If you're relying on Patreon to send back that parameter I'd suggest to generate a small proxy where you can redirect your calls to the dynamic link by generating it on the fly.
So:
Patreon shares www.myhost.com/supah-link?p1=aaa&p2=bbb
Your micro-service which runs on www.myhost.com/supah-link receives the call
You generate a dynamic link like the following:
https://example.page.link/?link=https://www.example.com/someresource&apn=com.example.android&amv=3&ibi=com.example.ios&isi=1234567&ius=exampleapp&p1=aaa&p2=bbb
NOTE: Pay attention to the &p1=aaa&p2=bbb parameters added
Return a 302 and redirect to your newly generated link
Based on how you configure it from the console this link can redirect to the store or your app, in your app you can listen for the link as follows:
FirebaseDynamicLinks.instance.onLink(
onSuccess: (dynamicLink) async => handleDeepLink(dynamicLink?.link),
);
In handleDeepLink you can parse your custom query parameters.
NOTE: The URL parameter you pass via the dynamic link HAS TO BE ENCODED! Which means your link will look more like this:
https://example.page.link/?link=https%3A%2F%2Fwww.example.com%2Fsomeresource%26apn%3Dcom.example.android%26amv%3D3%26ibi%3Dcom.example.ios%26isi%3D1234567%26ius%3Dexampleapp%26p1%3Daaa%26p2%3Dbbb

How to set AppClip invocation for URL with QueryParam?

I am trying to set the AppClip invocation for my App which is already released on app store.
I need an url such that it provides me a jobId e.g.: https://example.com/task?jobId=00001.
My use case is that I send the sms with the url https://example.com/task?jobId=00001 to the user, the user clicks on the url and the app gets started. Then for the other user I send the next url with corresponding jobId.
I did setup the AASA file for my domain (contains the JSON with "applinks" and "appclip" objects) which is valid, also the Domain status is valid on App Store Connect. There is a default experience set with title, subtitle, image and action. I also configured an advance experience for the url https://example.com/task.
However, my app clip doesn't get invoked if I access the url from either sms text or safari. :(
I do not have a web page for https://example.com/task therefore I haven't set up the meta data for this.
Is it possible to invoke the AppClip this way? It is really important for me that the URL is dynamic and I pass that jobId every time for each individual booking.
There s no much documentation and I already read at least twice Apple documentation about AppClip.
Because of this:
I do not have a web page for https://example.com/task therefore I haven't set up the meta data for this.
The answer to this:
Is it possible to invoke the AppClip this way?
Is no. Sorry, you need to own the domain you're working with, or at the very least have means to access its CNAME config (thus, be able to induce the owner of that domain to change the CNAME configs to what you want it to be, similar to what branch.io and AppsFlyer does with its users/clients).

Unable to get ad preview using facebook graph api?

Using the information from this documentation to generate iframe of the ad preview (in Facebook Graph API),
According to the documentation, we need to use the following URL
https://graph.facebook.com/v2.8/{adgroup-id}/previews/ad_format=
Not able to understand how to pass in the ad_format. It is compulsory to pass this parameter.
GET parameters are passed like:
https://graph.facebook.com/v2.8/{adgroup-id}/previews/?ad_format=DESKTOP_FEED_STANDARD
This question is old. But in order to run a preview you need to pass two parameters:
ad_format
There are various types of ad_formats: You generally use them according to your specific use. For basic mobile and desktop testing
DESKTOP_FEED_STANDARD, MOBILE_FEED_BASIC, MOBILE_FEED_STANDARD, MOBILE_FULLWIDTH will work fine
access_token
So your URL will be of the format :
https://graph.facebook.com/v4.0/AD_ID/previews?access_token=ACCESS_TOKEN&ad_format=DESKTOP_FEED_STANDARD

Send variable to 3rd party online form

In golang, is there a way to pipe a variable to part of a web form?
For example, sending "123 Random St." to the Street address part of https://www.dominos.com/en/pages/order/#/locations/search/ and so on? I found pizza_party*, but the GUI used is no longer available, I have also found pizzadash**, but this uses a credit card where I want to use cash. I even found a list of golang ones, but the links that they use doesn't work anymore.***
Therefore, my goal is so: order a pizza in golang through the dominos website API!
NOTE: Please suggest a package or function with example!
NOTE: I do not want to make a web scraper/data getter.
NOTE: Your answer must work on at least one box of my linked website.
NOTE: I want to fill out links similar to the provided link from the linux command line.
*https://github.com/coryarcangel/Pizza-Party-0.1.b
**https://github.com/bhberson/pizzadash
***https://golanglibs.com/top?q=pizza
This is how you post any form values onto an online form. Provided you know the POST endpoint of the service.
func main():
resp, err := http.PostForm(targetPostUrlHere,
url.Values{"Service_Type": {"Delivery"},
"Address_Type_Select": {"House"},
"Street": {"123 E 24th St"},
"Address_Line_2": {"4D"},
"City": {"New York"},
"Region": {"NY"},
"Postal_Code": {"10027"}})
}
**Note: The field keys and values are guesstimates. You must inspect the actual key names expected in the form.
In your case, https://www.dominos.com/en/pages/order/ is an endpoint for the form page. Once the form is filled and submitted, the information is submitted using POST method akin to the code afore-mentioned to a dedicated CREATE endpoint (C in the CRUD), which normally can be found in the <form> html tag.
<form action="posttargetendpoint" method="POST">...</form>
Once the POST operation is successful, usually a web service would redirect you to another page. In your case, it is https://www.dominos.com/en/pages/order/#/section/Food/category/AllEntrees/
However, any good web service wouldn't expose the POST endpoint in the clear since it is the vulnerable point of attack. You're welcome to find out by inspect he Domino's page source and adjust the field values in the Go code accordingly.
Now to make a command line prompt to wrap around the PostForm code, I suggest you look into https://github.com/codegangsta/cli which is a very nice package for creating quick command line app.
I assume you mean pipe information originating from your backend to another site on behalf of a user?
The standard way of passing information between domains is via HTTP params, usually via a GET request, but this capability would need to be supported by established protocols the remote site. You can also use an iframe to embed the page of another site onto your page, however, you wouldn't be able to remotely interact, call JS code, or even query the page at all. Cross-domain security safeguards justifiably prohibit such capability, and generally speaking, interacting on behalf of the user via their browser is also restricted for security reasons.
However, if you're looking to emulate user behavior such as with a bot or web scraper from your own host or browser then that's a different story. There are tons of frameworks provide rich capability for interacting with a page. I'd recommend checking out Selenium, which acts as a virtual browser. There are also tons of libraries in Python for processing data from HTML and structured data. You might want to check out Beatiful Soup and Scrapy.
Hope this helps.

Url parameters passing method

How passing of url parameters works in facebook, twitter , youtube or other similar sites .
eg:
facebook http://www.facebook.com/stackoverflowpage
twitter: http://twitter.com/StackOverflow
you tube: http://www.youtube.com/user/BBCWorldwide
where bold ones are parameters( i believe those are parameters)
What i have seen in most websites is like this,
http://www.website.com/index.php?id=stackoverflow
then how those above websties is passing parameters in different method,how they are doing this?. Or whether when a new user is joined in those website a new file is created in their server.
eg:
http://www.facebook.com/stackoverflowpage
http://www.facebook.com/stackoverflowpage.php(or .aspx whatever methods)
This is usually done by URL rewriting on ther server side. For example using .htaccess. A typical situation is: when a request of the form http://server.com/x/y comes in, it is rewritten as http://server.com/index.php?param1=x&param2=y and then passed on to the request processor (say, PHP).
Ref: http://en.wikipedia.org/wiki/Rewrite_engine