Responsys: Create a tracked link with dynamic path - crm

I am looking to create a dynamic/tracked link from a supplementary tabled based on product ID.
The URL format is:
https: // site.com/product/{$id}
Using the ${clickthrough('my_products',table.id)} method hasn't worked. The resulting URL, while tracked doesn't transform the ID parameter and results in a broken link.
Would like to know, what the clickthrough function should be and what to include in the link table.
Thanks,

Your URL format needs to be updated to:
https : //site.com/product/${id}
Then you need to add the parameter table.id to pass through to id (RI will recognize id as table.id most of the time, so this is unnecessary unless you're coding the URL in a <#data> loop where the field is aliased):
${clickthrough('my_products', 'id=' + table.id)}
Or you could just change ${id} to ${table.id} to call the field in directly so you don't have to code the parameter in the clickthrough:
https : //site.com/product/${table.id}
${clickthrough('my_products')}

Related

Understand Dynamic Links Firebase

I would like to understand better Firebase Dynamic Links because i am very new to this subject.
What i would like to know :
FirebaseDynamicLinks.instance.getInitialLink() is supposed to return "only" the last dynamic link created with the "initial" url (before it was shorten) ?
Or why FirebaseDynamicLinks.instance.getInitialLink() doesn't take a String url as a parameter ?
FirebaseDynamicLinks.instance.getDynamicLink(String url) doesn't read custom parameters if the url was shorten, so how can we retrieve custom parameters from a shorten link ?
My use case is quite simple, i am trying to share an object through messages in my application, so i want to save the dynamic link in my database and be able to read it to run a query according to specific parameters.
FirebaseDynamicLinks.instance.getInitialLink() returns the link that opened the app and if the app was not opened by a dynamic link, then it will return null.
Future<PendingDynamicLinkData?> getInitialLink()
Attempts to retrieve the dynamic link which launched the app.
This method always returns a Future. That Future completes to null if
there is no pending dynamic link or any call to this method after the
the first attempt.
https://pub.dev/documentation/firebase_dynamic_links/latest/firebase_dynamic_links/FirebaseDynamicLinks/getInitialLink.html
FirebaseDynamicLinks.instance.getInitialLink() does not accept a string url as parameter because it is just meant to return the link that opened the app.
Looks like there's no straightforward answer to getting the query parameters back from a shortened link. Take a look at this discussion to see if any of the workarounds fit your use case.

Google Optimize - create A/B test with dynamic URL

i'm from business and I would like to ask is it possible to create A/B test with dynamic part of URL?
API of backend application returns calculation ID for every visitor and its included on URL.
For example:
We have main URL www.example.pl and I want to create A/B test with redirect to dynamic URL:
www.example.com/calculation/(calculculation_id)
Is it possible?
If your goal is to redirect from https://www.example.com/product/laptop/12345
to https://www.example.com/product/laptop-test/12345 for each product and not for the product 12345.
Select test type redirect
Set up redirect rules for each variant
Customize your page targeting rules with "contains" or "starts with."
Customize your advanced redirection"
1.Set up redirect rules for each variant
Find in domain/path com/product
Replace with com/product-test
Add/modify query parameters/fragments (leave blank)
Original: https://www.example.com/product/laptop/12345
Redirect: https://www.example.com/product-test/laptop/12345 (see point 3.Customize your advanced redirection)
! Do not worry if you are entering the specific product 12345 this value seen by the system as variable xxxxx !
2.Customize your page targeting rules with "contains" or "starts with."
Modify the page targeting rules to ensure that we include any URL containing example.com/product.
3.Customize your advanced redirection.
In our example the text "com/product" is replaced with "com/product-test".
This is the site where you can find more information :
https://support.google.com/optimize/answer/6361119?hl=en
Yes, you can do that in different ways. I'd suggest using Feature Flags approach in your A/B test in order to have a flag to generated the dynamic next URL from the API.
I'll try to summarize in two steps that you should go:
Add a Javascript in the Optimize Visual Editor for. Example here. The idea is this script to add a new flag:
window.FeatureManager = window.FeatureManager || {};
window.FeatureManager.variant_1_to_change_the_url = true;
On your own script, look at this flag to call the backend API in order to get the calculated URL:
// in case of the variant 1
if (window.FeatureManager && window.FeatureManager.variant_1_to_change_the_url) {
// calls the API passing this flag to get the new URL
const redirectURL = fetch('my_endpoint', true/false); // true/false could be the variant verification
location.href = redirectURL; // this is a sample, you can change the URL however you want
} else {
// the original variation
}

How to increase the Fields of input in Firebase Leaderboard

Go to http://goo.gl/I4XLKF (Link to my jsfiddle workout)
Here I have tried to increase the input fields/option for Firebase LeaderBoard (https://www.firebase.com/tutorial/#example/leaderboard), But it is Not working.
I have defined 3 Inputs/Firebase elements
name - this element/child is for the name of website
AlternateURL - this element/child is for the URL of website
Score - this element/child is for setting priority to the URL by entering numerical values.
I am using this LeaderBoard script to allow my users to sumbit alternate url for the various apps.
I think in this section, you only need to use the name field to reference the row and not your alternateurl.
// Store a reference to the table row so we can get it again later.
htmlForPath[scoreSnapshot.name()] = newScoreRow;
htmlForPath[scoreSnapshot.AlternateURL()] = newScoreRow;
get rid of the last line.
Unless there is an error somewhere else, you've addressed the areas to change/add code (variable names are my version:
<input type="text" id="urlInput" placeholder="URL">
newScoreRow.append($("<td/>").text(scoreSnapshot.val().url));
var url1 = $("#urlInput").val();
userScoreRef.setWithPriority({ name:name, score:newScore, url:url1}, newScore);

Tracking by id in url with Google Analytics

I want to track views for stories on my site. I want to use Google analytics to do this. Off the bat Im thinking of doing this:
pageTracker._trackEvent('Story', 'View', 'Title of story');
But I also would prefer to track with the story id as well that is passed in the url. So if I want to run a report in GA I would like to have the option of getting stats by story title or by story id that is passed via url. Is that possible?
GA by default does not strip parameters from the URL when _trackPageview is triggered, so you will see unique pages show up in your reports. For example, these two will show up as separate entries:
/somePage.html?id=1
/somePage.html?id=2
edit:
Okay, you can use this to get whatever url parameter you want:
function getParam (n) {
var x=new RegExp("[\\?&]"+n.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]")+"=([^&#]*)");
var r=x.exec(window.location.href);
return(r==null)?'':r[1] ;
}
// example
var story = getParam('story'));
now story has whatever value the story=xxx URL parameter value is, and you can use story as your category value in your event tracking argument

How to track custom parameter with Google Analytics and utm.gif

The situation
I'd like to use GA to track some serverside operations. That's why I cant make use of the GA JavaScript functions. But, as you might know, you can request the utm.gif right from your server. This already works fine.
The Problem
I'd like to trackt custom parameters. But I have no idea how to add them in the right format to the url-request
This one should do the custom parms. But I didn't get any results in GA.
utme=5(Init*load_success*http://www.mydomain.de)8(userstatus)9(fan)11(2)
Full list of params:
ref ts
utmac UA-XXXXXX-5
utmcc __utma=186215409.1789216404.1265552708.1280074861.1280493144.21;+__utmz=;
utmcs ISO-8859-1
utmdt Button
utme 5(Init*load_success*http://www.mydomain.de)8(mycustomvar)9(mycustomvalue)11(2)
utmfl -
utmhn mydomain.de
utmje -
utmn 1114675642
utmp button
utmr http://www.mydomain.de
utmsc -
utmsr -
utmul de-de
utmwv 4.5.7
not sure what's going wrong, given what you posted, but how about you write out what you want to send the traditional way (with javascript) and put it on a test page. Use firebug or whatever to grab the requested url that's built and compare it to what you have now.
The value of the utme gif Request parameter is encoded by ga.js--it's the only one that is, as far as i know.
Calling __trackEvent is the usual way to set the value of utme. These are client-side events though, which is no doubt why you are trying to set utme directly.
So if you just want to bind 5(Initload_successhttp://www.mydomain.de)8(userstatus)9(fan)11(2) to the variable utme, and you can't rely on user-behavior to trigger that binding, then here's what i suggest:
Pack your data into a 'custom variable' scoped to the page--this way, when the __trackPageview() is called, the value will be set.
Here's the analytics code required in your HTML to implement that:
The method signature for a custom variable:
pageTracker._setCustomVar(slot, // integer between 1 and 5, inclusive (just use '1')
name, // user-defined name for the custom variable
value, // string representing the value for the custom variable
scope, // you want '3' for page-level (an int, not a string though)
);
Within the HTML (order matter, of course):
pageTracker.__setCustomvar(1, "A Name", "A Value", 3);
pageTracker.__trackPageview();
A key point here is that the parameter 'value' can be set dynamically, so for the 'value' parameter, i guess you want to pass in 5(Initload_successhttp://www.mydomain.de)8(userstatus)9(fan)11(2)
Finally, here are the two key sources (Implementation Guide, Usage Guide) on Custom Variables from the GA Team

Resources