How can I get merged data from website and mobile website for Google Analytics? - mobile

I have a website - and the website redirects the users automatically to its mobile site when the users access using mobile devices.
The problem is, Google Analytics treats those two pages as a separate page.
For exmaple,
http://story.pxd.co.kr/917 and
http://story.pxd.co.kr/m/post/917
are same page but GA shows statistics as two different pages.
How can I merge the data from the two pages?
(When I want to see mobile data only, GA already supports various ways for it)
Thank you in advance.
Jay

Untested as far as the regex goes and might need a little refinement, but the principle works like this:
Go to admin, views, filters. Create a new filter , custom, advanced.
In "Field A" select "Request Uri" from the dropdown.
In the text field at the right (extract) enter "./m(.)" (without quotes). This extracts everything to the right of /m via and stores it (via the brackets) in variable (if it does not work at the first go you have to look up regexp with Google and refine). The values of that variable now should be in your example "/post/917", it is accessible later via the placeholder $A1 ("A" because it's from field A, "1" because it is the first value extracted. If you use more than one bracket you might also have $A2, $A3 etc).
Leave Field B empty.
In "Output To" select "Request Uri". Enter your hostname http://story.pxd.co.kr/ . Append the placeholder $A1 - this contains the page path without the "m".
All steps combined will change "http://story.pxd.co.kr/m/post/917" to "http://story.pxd.co.kr/post/917" and thus unify the urls so they will be displayed as the same page in the reports (you might want to include some custom dimension to discern if this was a mobile view or a desktop view, or you can use the "device category" as second dimension to see which was which).
Btw. data that has already been recorded will not be changed, filters do not work on historical data. And be sure to keep a view without filters (filters are destructive and if you make a mistake you won't be able to recover the data).

Thank you Eike,
With your hint, I found better way.
I used 'Advanced Filter' with 'Search and Replace'
So let the GA search /m/post/ and replace with /
Thank you!

Related

Iframe content not able to save in module params Joomla

I am using Joomla3 with tinymce editor. I have created one module and adding one params in textarea
I am adding iframe code
in text area
but it's not saving. If i am save normal text string then it's saving
Please help me
I believe you need to add a filter to your xml code.
such as:
filter="RAW" or, probably more appropriately, filter="HTML"
This will keep Joomla from cleaning your code. There are a number of filters available to XML fields when creating modules. You can examine the code here: https://github.com/joomla/joomla-cms/blob/master/libraries/joomla/filter/input.php#L167 to see the exact list.
What user group is the account you are using a member of? Super Users and Administrator group types should have no filtering set by default but it sounds like you might need to edit those settings.
From the main menu:
System > Global Configuration > Text Filters (tab)
You will see all the available user groups for you website. The group your user belongs to should have a Filter Type of No Filtering. Another important note is its better to add the user account to a group with the permissions then to arbitrarily adding it to a group type typically reserved for registrants, guests or low-level editing.

Veeva Salesforce uploading presentation

maybe this is not a good quetion posted on this site, but I am trying to upload a presentation to SalesForce (https://test.salesforce.com/). I understand that at first I have to create "Key messages" which represent each slides in the presentation, then I create new CLM presentation and select presentation slides.
But then I am stucked. Is this everything to uploading the presentation or I have to migrate the presentation somewhere, upload somewhere else using FTP, etc.
I hope my question is understandable (because my English is not very good).
Thanks for help.
AFAIK, follow these steps to upload a presentation with single slide..
Create a Key message and upload the media (zip file). (Simply give key message name and upload proper well-formed zip)
Create a Presentation Slide (Just slide name)
Now, create a CLM Presentation, in which you need to browse and select the above 2 objects against their respective fields.
That's it on salesforce.
Now sync iRep app on device/iPad and it should come down in "Media".
Try this,
1.Create a new presentation
2.Go to CLM Key Messages tab and here, before creating a new key message you might need to create a new view("Create New View" link button) to group these key messages(at least that's how I do it).
Here you need to make sure that the filter method is set correctly otherwise I won't be able to see those key messages attached to this view.
So you can set sth like this(on step 2):
Field | Operator | Value
Message | contains | slide_prefix
On step 3 you need to add "Message" in "Selected fields" Tab
3.Now create a "New CLM Message" and make sure that it has "slide_prefix" on his name composition(Ex: if slide_prefix is "EXSlide" then clm message should be named like: EXSlide myslide01 or EXSlide_slide01)
4.After creating CLM key message you will be redirected to his info page where you need to upload the ".zip" file.
5.Last step is to create "New Presentation Slide"(On the bottom of the page). Here you need to input the Presentation(presentation name created on step 1), key message name(you can search for them) and a display order
Now sync the ipad and it should appear.
In addition to sTx answer, you can take a look at the "Veeva Content Creation Guidelines" (Link below). This will fit most of your developer needs.
Veeva Content Creation Guidelines
Keep in mind that often client groups have special region codes and labeling rules (see also: sTx answer to "Prefix" rules), that you have to follow, to match users and contents in a global account. If you dont, nothing will appear on the iPad. Example: yourID + Language + Country (YourID_ENG_UK.zip)
Also companys often split thier environment in two, a sandbox and a production section - Make sure you have the permission to see sandbox contents. For this purpose, activate the "Training Content" checkbox on the presentation object, to see your presentation without a migration.
All contents you create in the backend are by default visible to you on the iPad. Check the "Config" > "Media" list and look for your Zips files; if they get downloaded.

Is there a clean way of users managing their own locations?

A lot of my site is dynamically generated dependant on the user location.
To get an initial fix I am currently using the Smart_IP module which does this based on the user IP address - which works great as a starting point. I can access $_SESSION['smart_ip']['location']['longitude'] & $_SESSION['smart_ip']['location']['latitude'] as required - perfect!
But I need to allow my user to override this..
Using HTML5 geolocation. I want to only do this on user request, ie click 'locate me', rather than requesting their location uninvited.
Using one of a few pre-defined locations selectable by the user.
Using an inputed address by the user.
Is there any drupal module I can use for this, or how else could I achieve it?
-
Just to clarify, I am talking about anonymous users here - the general public visiting my site. I just want them to be able to refine their 'location' by overriding the defaults I give them using smart_ip.
I suggest to use Geolocation field and all it's submodules or Geofield. Last one provides more input methods.
Use the Address field module to allow the user create multiple addresses into a node (or even into his profile), Geocoder module to get the lon/lat from these addresses and then a Views to display them in a list.
Same as 2 but without views.
If you want to allow user select one of the 3 methods you can use an other - helper - field (eg a select list with the 3 options).
Finally you should add an extra field to store the lat/lon pair final values maybe with Computed field module or 2 simple textfields that will get the selected values through javascript.

Show Opportunity related Contacts in Custom Object Field

I have the next issue.
I have a custom object called 'Application', and I have this requirement:
"Show all Contacts related to an Application. Create a field on Application object, must be read only".
I solve it with apex code. 'Application' has a lookup to Opportunity, Opportunity to Account, and all my contacts have AccountId, so this way, I get all the contacts using apex code in a trigger.
But, I've been ask to change this to a Formula field in Application object.
So, my issue is next. I'm not able to get all contacts with advance formula editor, because they're not part of any object. I have no master-detail relationship.
Does any one know how can I achieve this using configuration? I should not use apex code for this req.
Thank in advance guys.
I don't think you can do it.
In formulas / merge fields syntax there's no way to go "up, up then down" (Application -> Opportunity -> Account -> down to Contacts related list). There's also nothing that would let you loop through Contacts (and display what? Ids? Names? Emails?). Roughly speaking you can only go up through dots.
You might want to explore path of "cross object workflow" rules but I imagine that when I add a new Contact to Account it should somehow "spread itself" to all related Applications? There's no straight way to fire a workflow on delete too - so you'd eventually end up with inaccurate list.
I'd say trigger was a good solution. Maybe it ws unoptimized but if it has to be in a field - tough.
There might be a fairly simple way of achieving that by embedding a visualforce page within Application page layout.
This should be doable with pure Visualforce (so technically there will be no Apex code ;))
Something as simple as
<apex:relatedList list="Contacts" subject="Application__c.Opportunity__r.AccountId" />
would be a good start (if you want your own layout and not a rel. list - you should be still able to pull it off with <apex:repeat> or <apex:pageBlockTable>.
There's one BUT here: it's not a field, just a display trick. Forget about using it in reports, mobile applications etc.
Another way - would it be acceptable to be 1 click away from these contacts? You could make a report "Account with Contacts", filter it by Id of one Account and later use "URL hacking" to change the filter depending on from which Application you'll click it. This link could be either a formula field or a real custom button/link. Technically - it's pure config, no apex & VF.
You can read more about URL hacking at Ray Dehler's excellent post and specifically about dynamic Reports here or here.

Dynamically disabling menu based on database query?

So I'm not a programmer, but my friend is. He's trying to help me develop a web/phone app but we are stuck because I'm having trouble communicating to him an idea and he is having trouble understanding. One or both of us is a moron ;) Part of the problem is that I don't even know where to search for the answer cuz I don't know the specific search terms...believe me I've tried...and I've searched stack overflow as well. Here is the problem:
Short Question:
Websites (like hotel search) allow you to search for rooms by selecting checkboxes in certain categories (i.e. smoking/nonsmoking, stars, size of bed, near downtown, etc.). Certainly these sites are referencing a large database of hotels in a city.
How can you create a site so that as you check boxes (narrow your search), other options which are no longer available are dynamically "grayed out" or disabled on the fly so you cannot check those boxes. So if I were to check 4 stars and that excluded all smoking rooms based on the database, then the option to check "smoking" would be disabled.
The key to this is that the site is querying a database as you click boxes, then based on the results of that query (which is presumably many rows of data (a subset)), it is analysing that subset of data to determine whether checkbox options should be on/off, then dynamically "graying out" specific options that are no longer available. Once you got to only a single possible result, then the site would pop up the website for that hotel (or some other action).
What is this called? Where can I get more information on this. Any pointing toward the right direction would be tremendously appreciated.
Thanks so much in advance!
Roy
HERE IS AN EDIT TO ORIGINAL QUESTION...HERE IS AN EXAMPLE:
So here is my sample database. Each Column (i.e. AA, AB, AC) represents a checkbox. '1'= True, '0'= False, and '2'= Either. Therefore, if you click checkbox AA, then only the top three rows would meet the criteria of AA=True. So query would return the top three rows. The '2's could be either True/False so since they don't affect outcome, those checkboxes should be disabled and only the checkboxes CA,CB, & CC should remain choosable. If you then click checkbox CB, then result ZYX would be output.
Conceptually, How do you go from the initial click to the point where the database is queried and the results are used to dynamically change the menu. People have suggested javascript but i am not looking for a language. I am more looking for the concept. I was thinking that the query would return a new "temp" array with just the top three rows. Then each column of this "temp" array would be queried to see if it contained a '1' in any of the rows. If it did, then that button would be turned "ON". If it didn't then that button would be turned "OFF". Is this confusing? Am I asking for too much ;)
This sounds like javascript could help. For example, using jQuery, you can dynamically send queries to databases based on whatever you click on checkboxes, and then reload a particular section of the webpage. Javascript can also dynamically disable checkboxes.

Resources