How can I delete a tag from Google Reader? - google-reader

So, I am writing some code against Google Reader's "API".
I am writing code that deletes all of the sites in a folder/tag. I can delete the sites just fine, but I can't find a way to delete the tag when everything is out of it.
So in the end all the sites are gone but I have this empty tag.
I am currently trying this, but google doesn't like it.
http://www.google.com/reader/api/0/edit-tag?client=XXX
POST params = "r=user/-/label/" + HttpUtility.UrlEncode(label) + "&T=" + Token
It seems to want a feed to go with it, but the point here isn't to remove a label from a feed (I can do that just fine), it is to remove the tag completely.
Any thoughts?
David

You can delete tags by sending a POST request to http://www.google.com/reader/api/0/disable-tag with the parameters s (tag to delete, i.e. user/-/label/tag_name) and T (the action token).

Related

Clickable link in email sent with the Trigger Email firebase extension

I am currently using the Trigger Email extension from Firebase to send emails whenever someone is invited to use the app by another user. I configured everything correctly and it is working perfectly except for one thing which is clickable links in the email.
I am using Handlebars with a template which is defined within a Firestore document. The template is made with HTML and looks like this:
<p>Hello {{invitedUser.firstName}},</p>
<p>You've been invited by {{user.fullName}} to join them on App Name here. By clicking on the link below you can accept this invitation.</p>
<p><a>{{inviteUrl}}</a></p>
<p>Best,<br>App Name here</p>
The email will be delivered but the inviteUrl is not clickable, it does display the url within the email. I also tried it using three brackets like {{{inviteUrl}}}.
I have also tried the following:
<p>Hello {{invitedUser.firstName}},</p>
<p>You've been invited by {{user.fullName}} to join them on App Name here. By clicking on the link below you can accept this invitation.</p>
<p>Accept invitation</p>
<p>Best,<br>App Name here</p>
But in this case the email is not delivered at all.. I don't know whats going wrong there. If I do the same but define a url directly instead of using inviteUrl the url is displayed but not clickable.
I have also seen some weird cases where I pasted a html example of a link online in my html and it worked and it stopped working whenever I modified the url, even when I changed the url back to the original one which was working before.
Using helpers for handlebars is not really an option as far as I have read as I am using the Trigger Email extension.
Maybe something is going wrong with storing the HTML in a string field in Firestore but I tried everything I know which is why I am asking this question here.
Alright, found the answer myself...
I was creating the Firestore mail objects from node js and the url I was using was of type any, casting it to String made it work.
The data object was:
{
inviteUrl: dynamicLink,
}
Changing it to this fixed it:
{
inviteUrl: String(dynamicLink),
}
The working html is:
Accept invitation

GTM both scripts (script / no-script) in header are working?

I have a question for GTM tag.
Actually, the customer put GTM tags (both tags - script /no-script) in the header.
Personally, I think it works well but I am not sure because I have this messages from google tag assistant. (which can verify the tag is working well or not)
enter image description here
Could you give some advice for this one?
I am not sure whether this works just fine or I need to ask customer change something for this one.
Thank you
If you have the option to implement the tag correctly you should. If you are using WordPress you could also use a plug-in.
The purpose of having and tag is ,
tag is used by default to collect analytics on the site and it is placed in header because its a tag(all scripts should be in header) and to collect information immediately when the page starts loading .
The shouldn't be placed in header section because its not a script and only scripts should be in header and also the use of tag is if a user disables the javascript while browsing the site then the no script tag will be used to collect the analytics on the site .
So, the its always good to place script tag in header as high as possible and no script in body as high as possible

Adobe tag manager - Direct Call Routes - Direct call rule "DCTEST" not found

Just wanted to know if anyone has ever seen this error when setting up Adobe Tag Manager Direct Call Routes. Direct call rule "DCTEST" not found.
I've logged created a new direct call rule named it DC TEST
In the conditions section named it DCTEST
In Adobe Analytic selected -> s.t(); - increment a pageview
Then in Javascript selected Non-Sequential and created a javascript script and added
window.alert("DC Fired")
Then in my localhost called
_satellite.track("DCTEST");
I get the error:
SATELLITE: Direct call Rule "DCTEST" not found
Event based tracking works and datalayer is populated as expected but when creating a direct call rule it doesn't seem to find what I've set up?
Followed the adobe video but still no luck?
https://outv.omniture.com/?v=tvaTY4ZzoJ087ioJpJptl9npM_8QGDxU
Any ideas?
Can anyone get the video to tutorial to work?
https://outv.omniture.com/?v=tvaTY4ZzoJ087ioJpJptl9npM_8QGDxU
Thanks
That error message is output when
a) The direct call rule doesn't exist
b) The direct call rule isn't published and you are in published/live mode (which is effectively the same thing as (a), in principle)
If you are using the production tag, you can put it into staging/debug mode by entering the following into your js console:
localStorage.setItem('sdsat_stagingLibrary',true);_satellite.setDebug(true);location.reload();
You can make a browser bookmark out of it like so:
javascript:try{localStorage.setItem('sdsat_stagingLibrary',true);_satellite.setDebug(true);location.reload();}catch(e){}
Then you can just press a bookmark button to put it into staging/debug mode.
Also there is an Adobe DTM Switch browser plugin which basically does the same thing (though it doesn't reload the page when you flip switches, so you still have to do that for it to take effect).

Using Google Analytics in readthedocs.org

My project documentation is hosted on readthedocs.org at
http://nsetools.readthedocs.org
Is it possible to use google analytics with documents hosted on readthedocs? Since html is not generated by me, I am not sure where to apply the google analytics code snippet.
I haven't tried this myself but see http://www.drmaciver.com/2015/04/getting-google-analytics-on-readthedocs/
Go to the Admin page for your project,
Click on “Advanced settings”,
Enter your Google Analytics Tracking ID in the box at the bottom that says 'Analytics ID'
TL;DR
Put googlea<id>.html (from Google Search Console) into docs/source and add
html_extra_path = ["googlea<id>.html"] somewhere in conf.py, then verify using Google Search Console.
Steps
Go to Google Search Console and enter your read the docs URL in the URL prefix box: e.g. https://mat-discover.readthedocs.io/en/latest. Click CONTINUE.
Download the googlea<id>.html file and place it in docs/source (e.g. mat_discover/docs/source). Use html_extra_path inside of conf.py as follows (i.e. add the following line somewhere in conf.py):
html_extra_path = ["googlea<id>.html"]
Inside the docs folder, run:
make clean
make html
and check to make sure docs/build/html/googlea<id>.html exists.
Commit, push, and wait for your RTD website to update (this could take a few minutes)
If you have the webpage from step 1 still open, click VERIFY, otherwise navigate back to Google Search Console, and re-enter your URL (e.g. https://mat-discover.readthedocs.io/en/latest). If it worked, it should tell you so, and you can then "Go to property". Notice that https://.readthedocs.io/en/latest/.html brings you to a bland HTML page with only the text from the Google Analytics HTML file
Note: Everywhere mentioned, replace "<id>" with the actual ID that is shown from step 1, and "<my-website>>" with the name of your RTD site.

Problem passing parameters via Iframe in IE

I'm trying to execute an HTTP GET from my website to another website that is brought in via iframe.
On Firefox, you can see in the source that the correct url is in the iframe src along with it's correct parameters-- and it works.
On IE, you can see in the source that the correct url is in the iframe src along with it's correct parameters-- and it doesn't work...
Is there something about IE that doesn't let you pass parameters through an iframe in the querystring?
I've tried refreshing the iframe in IE, I've tried refreshing my page & the iframe in IE, and I've tried copying the url and re-pasting it into the iframe src (forcing it to refresh as if I just entered it into the address bar for that iframe window). Still no luck!
Anyone know why this is happening, or have any suggestions to try to get around this?
Edit: I cannot give a link to this because the site requires a password and login credentials to both our site and our vendor's site. Even though I could make a test account on our site, it would not do any good for the testing process because I cannot do the same for the vendor site. As for the code, all it's doing is creating the src from the backend code on page load and setting the src attribute from the back end...
//Backend code to set src
mainIframe.Attributes["src"] = srcWeJustCreated;
//Front end iframe code
<iframe id="mainIframe" runat="server" />
Edit: Problem was never solved. Answer auto accepted because the bounty expired. I will re-ask this question with more info and a link to the page when our site is closer to going live.
Thanks,
Matt
By the default security settings in IE query parameters are blocked in Iframes. On the security tab under internet options set your security level to low. If this fixes your problem then you know that is your issue. If the site is for external customers then expecting them to turn down their security settings is probably unreasonable, so you may have to find a work around.
Let's say your site is www.acme.com and the iframe source is at www.myvendor.com.
IIRC, most domain-level security settings don't care about the hostname, so add a DNS CNAME to your zone file for myvendor.acme.com, pointed back to www.myvendor.com. Then, in your IFRAME, set the source using your hostname alias.
Another solution might be to have your Javascript set the src to a redirector script on your own server (and, thus, within your domain). Your script would then simply redirect the IFRAME to the "correct" URL with the same parameters.
If it suits you, you can communicate between sites with fragment identifiers. You can find an article here: http://tagneto.blogspot.com/2006/06/cross-domain-frame-communication-with.html
What BYK said. I think what's happening is you are GETting a URL that is too large for IE to handle. I notice you are trying to send variable named src, which is probably very long, over 4k. I ran into this problem before, and this was my code. Notice the comment about IE. Also notice it causes a problem with Firefox then, which is addressed in another comment.
var autoSaveFrame = window.frames['autosave'];
// try to create a temp form object to submit via post, as sending the browser to a very very long URL causes problems for the server and in IE with GET requests.
var host = document.location.host;
var protocol = document.location.protocol;
// Create a form
var f = autoSaveFrame.document.createElement("form");
// Add it to the document body
autoSaveFrame.document.body.appendChild(f);
// Add action and method attributes
f.action = protocol + '//' + host + "/autosave.php"; // firefox requires a COMPLETE url for some reason! Less a cryptic error results!
f.method = "POST"
var postInput = autoSaveFrame.document.createElement('input');
postInput.type = 'text'
postInput.name = 'post';
postInput.value = post;
f.appendChild(postInput);
//alert(f.elements['post'].value.length);
// Call the form's submit method
f.submit();
Based on Mike's answer, the easiest solution in your case would be to use "parameter hiding" to convert all GET parameters into a single URL.
The most scalable way would be for each 'folder' in the URL to consist of the parameter, then a comma, then the value. For example you would use these URLs in your app:
http://example.com/app/param,value/otherparam,othervalue
http://example.com/app/param,value/thirdparam,value3
Which would be the equivalent of these:
http://example.com/app?param=value&otherparam=othervalue
http://example.com/app?param=value&thirdparam=value3
This is pretty easy on Apache with .htaccess, but it looks like you're using IIS so I'll leave it up to you to research the exact implementation.
EDIT: just came back to this and realised it wouldn't be possible for you to implement the above on a different domain if you don't own it :p However, you can do it server-side like this:
Set up the above parameter-hiding on your own server as a special script (might not be necessary if IE doesn't mind GET from the same server).
In Javascript, build the static-looking URL from the various parameters.
Have the script on your server use the parameters and read the external URL and output it, i.e. get the content server-side. This question may help you with that.
So your iframe URL would be:
http://yoursite.com/app/param,value/otherparam,othervalue
And that page would read and display the URL:
http://externalsite.com/app?param=value&otherparam=othervalue
Try using an indirect method. Create a FORM. Set its action parameter to the base url you want to navigate. Set its method to POST. Set its target to your iframe and then create the necessary parameters as hidden inputs. Finally, submit the form. It should work since it works with POST.

Resources